function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)}return A}function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}function Set_Cookie(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24}else{A=30*1000*60*60*24}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((A)?";expires="+F.toGMTString():"")+((H)?";path="+H:"")+((D)?";domain="+D:"")+((G)?";secure":"")}function moreMaterilas(C,B,A){if(B=="close"){Set_Cookie(A,"0");document.getElementById(C).style.display="none"}if(B=="open"){Set_Cookie(A,"1");document.getElementById(C).style.display="block"}}function showhelppopup(C,D,E,B,A){xposition=0;yposition=0;if((parseInt(navigator.appVersion)>=4)&&(A)){xposition=(screen.width-E)/2;yposition=(screen.height-B)/2}args="width="+E+",height="+B+",location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx="+xposition+",screeny="+yposition+",left="+xposition+",top="+yposition;window.open(C,D,args)}function showforgot(A){swidth=600;sheight=400;xposition=0;yposition=0;if(parseInt(navigator.appVersion)>=4){xposition=(screen.width-swidth)/2+20;yposition=(screen.height-sheight)/2+20}args="width="+swidth+",height="+sheight+",location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx="+xposition+",screeny="+yposition+",left="+xposition+",top="+yposition;sUrl="login_forgot.asp?rtype="+A;window.open(sUrl,"forgot",args)}function confirmMsg(A,B){if(confirm(B)){document.location.href=A}}function showPriority(){priority_form.Txt_Priority.value=priority_form.missing_select.value}function RefreshPoint(A){document.frmRefreshPoint.submit()}function validateSearch(){var A=search_form.Txt_SearchKey;var B=true;if(search_form.search_select.value=="memregdate"&&A.value!=""){if(A.value.length>10){alert("The date format should be : mm/dd/yyyy");B=false;return false}else{if(isDate(A.value)==false){A.focus();B=false;return false}}}if(B==true){search_form.submit();return true}}function validateCustSearch(){custsearch_form.submit();return true}function SlctJudge(F,C){SlctJudgeHidAll(C);var B=C+F;var D="Table_"+F;var A=document.getElementById(B);if(document.getElementById(B)){if(A.className=="Hidden"){A.className="UnHidden"}else{A.className="Hidden"}A.focus();var E=document.getElementById(D);if(document.getElementById(D)){E.style.backgroundColor="red"}}}function SlctJudgeHidAll(D){var C;var G="<%response.write uJudgeIndx%>";var B;var A;var E,F;if(G==""){G=5}for(B=0;B<=G;B++){C=D+B;A=document.getElementById(C);if(document.getElementById(C)){A.className="Hidden"}E="Table_"+B;F=document.getElementById(E);if(document.getElementById(E)){F.style.backgroundColor="#CCCCCC"}}}function SetJudgeIndx(){document.getElementById("judge_0").className="UnHidden"}function CheckEnterJudgetool(A){if(A==0){alert("The maximum number of Judges allowed to vote in this match has exceeded.  Please select another Match to vote in.")}else{alert("Sorry !!! Already some other Judge has started voting for this match. Please vote on other Matches")}}function padlength(B){var A=(B.toString().length==1)?"0"+B:B;return A}function displaytime(){serverdate.setSeconds(serverdate.getSeconds()+1);var B=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear();var A=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds());document.getElementById("servertime").innerHTML=B+" "+A+" PST"}function startmoveclock(){setInterval("displaytime()",1000)}function admin_logout(){var C;var D=window.location.href;var B=D.split("?");if(B.length==1){C="?"}else{D=B[0];C="?";sParams=B[1].split("&");for(i=0;i<sParams.length;i++){if(sParams[i]=="rCaller=admin"){break}else{D+=C+sParams[i];C="&"}}}var A="rCaller=admin&rCommand=logout";D=D+C+A;window.location.href=D}function login_submit(B,A){if(CheckUsername(B.login_username,"User Name")==false){return false}if(CheckPassword(B.login_password)==false){return false}sLoc=window.location.href;B.action=FilterLoc(sLoc,A);B.submit()}function FilterLoc(E,G){var H;var C;var B;var A;var D;var F;B=E.split("/");E=B[B.length-1];A=E.split("?");E=A[0];if(E==""){E="home.asp"}D="?";if(A.length>1){sParams=A[1].split("&");for(i=0;i<sParams.length;i++){if(sParams[i]=="rCaller=admin"){break}else{E+=D+sParams[i]}D="&"}F="true"}sLgAray=E.split("&logobanner");if(F!="true"){E+="?"}if(sLgAray.length<=1){E+="&logobanner="+G}return E}function loginpop(E){var F;var D;var C;var B;D=window.location.href;ssLoc=D;C=D.split("/");D=C[C.length-1];B=E.split("?");D=B[0];if(D=="login.asp"){return }if(B.length>1){sParams=B[1].split("&");var A=0;for(i=0;i<sParams.length;i++){if(sParams[i]=="rCaller=admin"){break}else{if(A++==0){D+="?"}else{D+="+@"}D+=sParams[i]}}}F="login.asp?LinkName="+E+"&rLoc="+D;showpopup(F,"login",330,350,1)}function showpopup(C,D,E,B,A){xposition=0;yposition=0;if((parseInt(navigator.appVersion)>=4)&&(A)){xposition=(screen.width-E)/2;yposition=(screen.height-B)/2}args="width="+E+",height="+B+",location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx="+xposition+",screeny="+yposition+",left="+xposition+",top="+yposition;window.open(C,D,args)}function doStream(C,A,E,D,B){document.location.href="zbase_media.asp?media="+C+"&contestid="+A+"&memberid="+E+"&subid="+D+"&mdurl="+B}function picturedetail(picurl,w,h){detailsWin="left=50,top=50,width="+(eval(w)+40)+",height="+(eval(h)+40)+",scrollbars=yes,resizable=yes";window.open("base_picture.asp?picurl="+picurl,"title",detailsWin)}function doVideo(C,A,E,D,B){document.location.href="base_video.asp?media="+C+"&contestid="+A+"&memberid="+E+"&subid="+D+"&mdurl="+B}function openbar(A){url="contest_result.asp?"+A;detailsWin="width=550,height=300,scrollbars=no,toolbar=no,resizable=yes,left=50,top=50";window.open(url,"name",detailsWin)}function openbarj(A){url="contest_result.asp?"+A;detailsWin="width=550,height=300,scrollbars=yes,toolbar=no,resizable=yes,left=50,top=50";window.open(url,"name",detailsWin)}function Terminate(){sOpener=window.opener;sLoc=sOpener.location.href;if(sOpener!=null){sOpener.location.href=sLoc}window.close();return true}function loginwin(A){document.location.href="fan_register.asp?rLoc="+A}function attach_popup(A){sTarget="contestant_attach.asp?"+A;showhelppopup(sTarget,"win",560,440,1)}function submit_validate(C,B,D){var A=document.submit_form;if(CheckFieldEmpty(A.Txt_Name,"Name")){return false}if(CheckFieldLength(A.Txt_Short,"a brief description of your submission.",80)){return false}if(A.Txt_Detail.value.length>0){if(CheckFieldLen(A.Txt_Detail,"Detailed Description",5000)){return false}}return true}function submit_validatePhoto(H,B,G,C,F,E,D){var A=document.submit_form;if(CheckFieldEmpty(A.Txt_Name,"Contestant Name")){return false}if(CheckFieldSpaces(A.Txt_Name,"Contestant Name")){return false}if(CheckCharecterAndNum(A.Txt_Name,"Contestant Name")){return false}if(A.Txt_Short.value.length>0){if(CheckFieldLength(A.Txt_Short,"a brief description of your submission.",80)){return false}}if(B=="Y"){if(CheckAllPhotoSubmit(H,"document.submit_form.Txt_Picture","Photos")==false){return false}}if(C=="Y"){if(CheckAllPhotoSubmit(G,"document.submit_form.Txt_Media","Audios")==false){return false}}if(E=="Y"){if(CheckAllPhotoSubmit(F,"document.submit_form.Txt_Video","Video")==false){return false}}if(A.Txt_Detail.value.length>0){if(CheckFieldLength(A.Txt_Detail,"Detailed Description",5000)){return false}}if(D=="y"){if(A.ChkConfirm.checked==false){alert("Please select the Contest Rules check box.");return false}}return true}function CheckAllPhotoSubmit(dMin,dUrlText,dText){if(dMin>0){if(dMin>eval(dUrlText).value){alert("You must submit minimum of "+dMin+" "+dText+".");return false}}else{return true}};