function StarPopup(){
var _1=this;
var _2=null;
var _3=null;
var _4=null;
var _5=null;
var _6=null;
var _7=null;
var _8=false;
var _9=null;
var _a=true;
var _b=navigator.userAgent.toLowerCase();
var _c=(_b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];
var _d=/webkit/.test(_b);
var _e=/opera/.test(_b);
var _f=/msie/.test(_b)&&!/opera/.test(_b);
var _10=/mozilla/.test(_b)&&!/(compatible|webkit)/.test(_b);
this.loadPopup=function(a,p,_13,_14,_15){
var _16;
var _17=(_15!=undefined)?_15:false;
if(_13){
if(_17){
if(_4==null){
_4=new StarRequest(_13,_17);
}
_16=_4;
}else{
if(_2==null){
_2=new StarRequest(_13,_17);
}
_16=_2;
}
}else{
if(_17){
if(_5==null){
_5=new StarRequest(_13,_17);
}
_16=_5;
}else{
if(_3==null){
_3=new StarRequest(_13,_17);
}
_16=_3;
}
}
for(var i in _14){
if(i=="a"||i=="p"){
alert("Error. Parameters 'a' and 'p' are forbidden.");
}
}
if(!_14){
_14={};
}
_14["a"]=a;
_14["p"]=p;
_16.onload=getPopupResponse;
_16.getURL(null,_14);
};
this.showPopup=function(url,_1a,_1b,_1c,_1d,_1e){
var _1f;
var _20=(_1c!=undefined)?_1c:true;
_9=_1d;
if(_1e!=undefined){
_a=_1e;
}
if(_1a){
if(_20){
if(_4==null){
_4=new StarRequest(_1a,_20);
}
_1f=_4;
}else{
if(_2==null){
_2=new StarRequest(_1a,_20);
}
_1f=_2;
}
}else{
if(_20){
if(_5==null){
_5=new StarRequest(_1a,_20);
}
_1f=_5;
}else{
if(_3==null){
_3=new StarRequest(_1a,_20);
}
_1f=_3;
}
}
_1f.onload=getPopupResponse;
_1f.getURL(url,_1b);
};
this.unloadPopup=function(_21){
if(_8){
Effect.Shrink("overlay_content",{duration:0.2,afterFinish:function(){
removeOverlay();
if(_21){
eval(_21);
}
}});
}
};
this.clearCache=function(){
if(_2!=null){
_2.clearCache();
}
if(_4!=null){
_4.clearCache();
}
};
this.centerPopup=function(_22){
if(_8){
var _23=document.getElementById("overlay_content");
_23.style.left=Math.floor((document.body.offsetWidth-_23.offsetWidth)/2)+"px";
if(!_22){
if(_f){
var _24=getScrollXY();
var _25=getViewportSize();
_23.style.top=Math.floor(_24[1]+(_25[1]-_23.offsetHeight)/2)+"px";
}else{
_23.style.top=Math.floor((window.innerHeight-_23.offsetHeight)/2)+"px";
}
}else{
var y=Math.floor(getCoords(_22)[1]-(_23.offsetHeight/2));
if(y<0){
y=10;
}
_23.style.top=y+"px";
}
}
};
function getPopupResponse(_27){
_6=_27;
if(!_8){
activateMask();
showPopup();
}else{
Effect.Shrink("overlay_content",{duration:0.3,afterFinish:changeOverlayContent});
}
}
function activateMask(){
if(!_a){
return;
}
var _28=getPageSize();
var _29=document.createElement("div");
_29.setAttribute("id","overlay_mask");
_29.style.width=_28[0]+"px";
_29.style.height=_28[1]+"px";
document.body.appendChild(_29);
}
function deactivateMask(){
if(!_a){
return;
}
var o=document.getElementById("overlay_mask");
o.parentNode.removeChild(o);
}
function changeOverlayContent(){
var _2b=document.getElementById("overlay_content");
_2b.parentNode.removeChild(_2b);
showPopup();
}
function showPopup(){
if(_f&&!_8){
if(getIEVersion()<7){
setSelects("none");
}
}
_8=true;
var _2c=document.createElement("div");
_2c.setAttribute("id","overlay_content");
_2c.innerHTML=_6;
document.body.appendChild(_2c);
_1.centerPopup(_9);
executeScripts(_2c);
clear();
}
function clear(){
_6=null;
}
function executeScripts(_2d){
if(_10){
return;
}
_7=new Array();
var _2e=_2d.getElementsByTagName("script");
for(i=0;i<_2e.length;i++){
var cur=_2e[i];
if(!cur.src){
if(window.execScript){
try{
window.execScript(cur.text);
}
catch(e){
}
}else{
window.setTimeout(cur.text,0);
}
}else{
var src=cur.getAttribute("src");
if(!$(src)){
var _31=document.createElement("script");
for(j=0;j<cur.attributes.length;j++){
_31.setAttribute(cur.attributes[j].nodeName,cur.attributes[j].nodeValue);
}
_31.id=src;
if(_31.addEventListener){
_31.addEventListener("load",remoteCall,false);
}else{
_31.onreadystatechange=function(){
if(_31.readyState=="loaded"){
remoteCall(_31);
}
};
}
_7[_7.length]=_31;
}
}
}
addScripts();
_7=null;
}
function addScripts(){
var _32=document.getElementsByTagName("head")[0];
for(i=0;i<_7.length;i++){
_32.appendChild(_7[i]);
}
}
function remoteCall(e){
var _34=e.currentTarget?e.currentTarget:e;
}
function setSelects(_35){
var sel=document.getElementsByTagName("select");
for(var i=0;i<sel.length;i++){
var o=sel[i];
if((o.type=="select-multiple"||o.type=="select-one")&&o.style){
o.style.display=_35;
}
}
}
function removeOverlay(){
var o=document.getElementById("overlay_content");
o.parentNode.removeChild(o);
deactivateMask();
if(_f){
if(getIEVersion()<7){
setSelects("");
}
}
_8=false;
_a=true;
}
function getIEVersion(){
var rv=-1;
if(_f){
var ua=navigator.userAgent;
var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if(re.exec(ua)!=null){
rv=parseFloat(RegExp.$1);
}
}
return rv;
}
function init(){
addStyle("#overlay_mask {position: absolute;left:0px;top:0px;width:100%;height:100%;z-index:100;background-color:#000000;filter:alpha(opacity=50);-moz-opacity:0.5;opacity:.50;}");
addStyle("#overlay_content {position: absolute;left: 50%;top: 50%;z-index: 101;}");
addStyle("#overlay_content[id] {position:fixed;}");
}
init();
}

