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;
this.loadPopup=function(a,p,_b,_c,_d){
var _e;
var _f=(_d!=undefined)?_d:false;
if(_b){
if(_f){
if(_4==null){
_4=new StarRequest(_b,_f);
}
_e=_4;
}else{
if(_2==null){
_2=new StarRequest(_b,_f);
}
_e=_2;
}
}else{
if(_f){
if(_5==null){
_5=new StarRequest(_b,_f);
}
_e=_5;
}else{
if(_3==null){
_3=new StarRequest(_b,_f);
}
_e=_3;
}
}
for(var i in _c){
if(i=="a"||i=="p"){
alert("Error. Parameters 'a' and 'p' are forbidden.");
}
}
if(!_c){
_c={};
}
_c["a"]=a;
_c["p"]=p;
_e.onload=_10;
_e.getURL(null,_c);
};
this.showPopup=function(url,_11,_12,_13,_14,_15){
var _16;
var _17=(_13!=undefined)?_13:true;
_9=_14;
if(_15!=undefined){
_a=_15;
}
if(_11){
if(_17){
if(_4==null){
_4=new StarRequest(_11,_17);
}
_16=_4;
}else{
if(_2==null){
_2=new StarRequest(_11,_17);
}
_16=_2;
}
}else{
if(_17){
if(_5==null){
_5=new StarRequest(_11,_17);
}
_16=_5;
}else{
if(_3==null){
_3=new StarRequest(_11,_17);
}
_16=_3;
}
}
_16.onload=_10;
_16.getURL(url,_12);
};
this.unloadPopup=function(_18){
if(_8){
Effect.Shrink("overlay_content",{duration:0.2,afterFinish:function(){
_19();
if(_18){
eval(_18);
}
}});
}
};
this.clearCache=function(){
if(_2!=null){
_2.clearCache();
}
if(_4!=null){
_4.clearCache();
}
};
this.centerPopup=function(_1a){
if(_8){
var _1b=document.getElementById("overlay_content");
_1b.style.left=Math.floor((document.body.offsetWidth-_1b.offsetWidth)/2)+"px";
if(!_1a){
if(is_ie){
var _1c=getIEVersion()<8?getScrollXY():[0,0];
var _1d=getViewportSize();
_1b.style.top=Math.floor(_1c[1]+(_1d[1]-_1b.offsetHeight)/2)+"px";
}else{
_1b.style.top=Math.floor((window.innerHeight-_1b.offsetHeight)/2)+"px";
}
}else{
var y=Math.floor(getCoords(_1a)[1]-(_1b.offsetHeight/2));
if(y<0){
y=10;
}
_1b.style.top=y+"px";
}
}
};
function _10(_1e){
_6=_1e;
if(!_8){
_1f();
_20();
}else{
Effect.Shrink("overlay_content",{duration:0.3,afterFinish:_21});
}
};
function _1f(){
if(!_a){
return;
}
var _22=getPageSize();
var _23=document.createElement("div");
_23.setAttribute("id","overlay_mask");
_23.style.width=_22[0]+"px";
_23.style.height=_22[1]+"px";
document.body.appendChild(_23);
};
function _24(){
if(!_a){
return;
}
var o=document.getElementById("overlay_mask");
o.parentNode.removeChild(o);
};
function _21(){
var _25=document.getElementById("overlay_content");
_25.parentNode.removeChild(_25);
_20();
};
function _20(){
if(is_ie&&!_8){
if(getIEVersion()<7){
_26("none");
}
}
_8=true;
var _27=document.createElement("div");
_27.setAttribute("id","overlay_content");
_27.innerHTML=_6;
document.body.appendChild(_27);
_1.centerPopup(_9);
_28(_27);
_29();
};
function _29(){
_6=null;
};
function _28(_2a){
if(is_ff){
return;
}
_7=new Array();
var _2b=_2a.getElementsByTagName("script");
for(i=0;i<_2b.length;i++){
var cur=_2b[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 _2c=document.createElement("script");
for(j=0;j<cur.attributes.length;j++){
_2c.setAttribute(cur.attributes[j].nodeName,cur.attributes[j].nodeValue);
}
_2c.id=src;
if(_2c.addEventListener){
_2c.addEventListener("load",_2d,false);
}else{
_2c.onreadystatechange=function(){
if(_2c.readyState=="loaded"){
_2d(_2c);
}
};
}
_7[_7.length]=_2c;
}
}
}
_2e();
_7=null;
};
function _2e(){
var _2f=document.getElementsByTagName("head")[0];
for(i=0;i<_7.length;i++){
_2f.appendChild(_7[i]);
}
};
function _2d(e){
var _30=e.currentTarget?e.currentTarget:e;
};
function _26(_31){
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=_31;
}
}
};
function _19(){
var o=document.getElementById("overlay_content");
o.parentNode.removeChild(o);
_24();
if(is_ie){
if(getIEVersion()<7){
_26("");
}
}
_8=false;
_a=true;
};
function _32(){
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;}");
};
_32();
};

