function CreateAJAXIndicator(){var A=document.createElement("img");
A.src="/images/indicator.gif";
return $(A);
}function ReMapControlOnClick(A,B,D){if(A!=null){var C=A.onclick;
if(C!=null){A.onclick=function(){if(B(A,D)){C();
}else{return false;
}};
}else{A.onclick=function(){return B(A,D);
};
}}}function ReMapControlJSHref(ctl,newFunc,parm){if(ctl!=null){var f=unescape(ctl.href);
f=f.substring(11);
ctl.href="#";
ctl.onclick=function(){if(newFunc(ctl,parm)){eval(f);
}else{return false;
}};
}}function RedirectEnterKeyToButton(A,B){A.onkeypress=function(C){return RedirectEnterKeyOnKeyPressToFunction(C,function(){if(B){B.onclick();
}});
};
}function RedirectEnterKeyToFunction(A,B){A.onkeypress=function(C){return RedirectEnterKeyOnKeyPressToFunction(C,B);
};
}function RedirectEnterKeyOnKeyPressToFunction(C,B){var A=C?C.which:window.event.keyCode;
if(A==13){B();
return false;
}}function FixDefaultButtonSubmitProblem(elButton){if(elButton&&typeof (elButton.click)=="undefined"){elButton.click=function(){var result=true;
if(elButton.onclick){result=elButton.onclick();
}if(typeof (result)=="undefined"||result){eval(elButton.getAttribute("href"));
}};
}}function FocusOnTextbox(A){window.setTimeout(function(){try{A.focus();
}catch(B){}},100);
}function RegisterTextboxHint(B,A){B.TextboxHintValue=A;
$(B).onfocus=function(){if(this.value==A){this.value="";
this.removeClassName("sampletext");
}};
$(B).onblur=function(){if(this.value==""){this.value=A;
this.addClassName("sampletext");
}};
$(B).onblur();
}function CheckForbiddenExtension(C,A){var B=new RegExp(".("+A+")$","i");
if(B.test(C)){return false;
}else{return true;
}}function CheckPathChars(B){var A=new RegExp('[\\*|\\?|\\"|\\<|\\>|\\|]',"i");
if(A.test(B)){return false;
}else{return true;
}}function ClientValidateForbiddenChars(B,A){if(CheckPathChars(A.Value)){A.IsValid=true;
}else{A.IsValid=false;
}}function createCookie(C,D,E){if(E){var B=new Date();
B.setTime(B.getTime()+(E*24*60*60*1000));
var A="; expires="+B.toGMTString();
}else{var A="";
}document.cookie=C+"="+D+A+"; path=/";
}function readCookie(B){var D=B+"=";
var A=document.cookie.split(";");
for(var C=0;
C<A.length;
C++){var E=A[C];
while(E.charAt(0)==" "){E=E.substring(1,E.length);
}if(E.indexOf(D)==0){return E.substring(D.length,E.length);
}}return null;
}function eraseCookie(A){createCookie(A,"",-1);
}function FitImageInRectangle(C,B){var A=[];
if(C[0]==0||C[1]==0){return[0,0];
}if((C[0]/C[1])>(B[0]/B[1])){A[0]=B[0];
A[1]=parseInt((B[0]*(C[1]/C[0])),10);
}else{A[1]=B[1];
A[0]=parseInt((B[1]*(C[0]/C[1])),10);
}if(A[0]>C[0]){return C;
}return A;
}function ShowImageCenteredInContainer(D,E,A,B){if(E==""){E="/images/image_not_found.gif";
A=[100,100];
}var C=FitImageInRectangle(A,B);
if(C[0]>0){D.style.width=C[0]+"px";
D.style.height=C[1]+"px";
D.style.left=parseInt(((B[0]-C[0])/2),10)+"px";
D.style.top=parseInt(((B[1]-C[1])/2),10)+"px";
}else{D.style.width="auto";
D.style.height="auto";
D.style.display="none";
D.onload=function(){this.onload=null;
var G=this;
var F=function(){ShowImageCenteredInContainer(D,E,[G.width,G.height],B);
};
if(this.width>0&&this.height>0){F();
}else{window.setTimeout(function(){if(G.width>0&&G.height>0){F();
}},1);
}this.style.display="";
};
}D.src=E;
window.setTimeout(function(){if(D.width>0){if(typeof D.onload=="function"){D.onload();
}}},1);
}function GetIFrameDocument(A){if(A.contentWindow){return A.contentWindow;
}else{return A.document;
}}