var LEFT="left";var RIGHT="right";var FADE_OUT="out";var FADE_IN="in";var ca=1;var cb=1;var enablescroll=true;function toggleScroll(){enablescroll=true}function scrollDiv(divName,scrollDir){scrollDir=="left"?factor=140:factor=-147;var anim=new YAHOO.util.Scroll(divName,{scroll:{by:[factor,0]}},1);anim.animate();setTimeout("toggleScroll()",1000)}var globalflag=0;function scrollDivVert(divName,scrollDir){scrollDir=="top"?factor=180:factor=-180;var anim=new YAHOO.util.Scroll(divName,{scroll:{by:[150,factor]}},1);anim.animate();setTimeout("toggleScroll()",1000)}function scrollDivVert1(divName,scrollDir){scrollDir=="top"?factor=65:factor=-65;var anim=new YAHOO.util.Scroll(divName,{scroll:{by:[150,factor]}},1);anim.animate();setTimeout("toggleScroll()",1000)}function fadeDiv(divName,fadeDir){fadeDir=="in"?factor=1:factor=0.3;var anim=new YAHOO.util.Anim(divName,{opacity:{to:factor}},1,YAHOO.util.Easing.easeOut);anim.animate()}function scrollLeft(iden){if(iden=="a"){if(ca<=7&&enablescroll==true){enablescroll=false;scrollDiv("tabmaincontent"+iden,LEFT);fadeDiv("tabmiddlecontent"+iden+ca,FADE_OUT);fadeDiv("tabmiddlecontent"+iden+(ca+1),FADE_IN);ca++}}else{if(cb<=7&&enablescroll==true){enablescroll=false;scrollDiv("tabmaincontent"+iden,LEFT);fadeDiv("tabmiddlecontent"+iden+cb,FADE_OUT);fadeDiv("tabmiddlecontent"+iden+(cb+1),FADE_IN);cb++}}}function scrollwakeupup(){enablescroll=false;scrollDivVert("videoscrollpanel","bottom")}function scrollwakeupdown(){enablescroll=false;scrollDivVert("videoscrollpanel","top")}function scrollwakeupup1(){enablescroll=false;scrollDivVert1("feedlistcontent","bottom")}function scrollwakeupdown1(){enablescroll=false;scrollDivVert1("feedlistcontent","top")}function scrollRight_viewvideo(){enablescroll=false;scrollDiv("videoscroll_panel",RIGHT)}function scrollLeft_viewvideo(){enablescroll=false;scrollDiv("videoscroll_panel",LEFT)}var downcount=1;var upcount=1;function scrollLeftVert(iden,tot){enablescroll=false;scrollDivVert("vvtrvpanelcontent","top");valstart=document.getElementById("bot_text").value;vaarstart=valstart.split(",");start=vaarstart[0];if(start>(tot-4)*170){img=CONFIG_HOME_URL+"images/vav_trv_bottomarrow.jpg";document.getElementById("bottom").innerHTML="<div class='trvbottomarrow' align='center'><a  onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image51','','"+img+"',1);><img src="+img+" alt='Arrow' name='Image51' width='31' height='29' border='0' id='Image51' /></a></div>"}valend=document.getElementById("bot_text").value;vaarend=valend.split(",");end=vaarend[1];var img22=CONFIG_HOME_URL+"images/vav_trv_toparrow.jpg";var img11=CONFIG_HOME_URL+"images/vav_trv_toparrow1.jpg";document.getElementById("up").innerHTML="<div class='trvtoparrow' align='center' onclick=scrollRightVert('a',"+tot+");><a onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image47','','"+img11+"',1);><img src="+img22+" alt='Arrow' name='Image47' width='31' height='29' border='0' id='Image47' /></a></div>"}function scrollRightVert(iden,tot){enablescroll=false;scrollDivVert("vvtrvpanelcontent","bottom");valstart=document.getElementById("bot_text").value;vaarstart=valstart.split(",");start=vaarstart[0];var img22=CONFIG_HOME_URL+"images/vav_trv_bottomarrow.jpg";var img1=CONFIG_HOME_URL+"images/vav_trv_bottomarrow1.jpg";document.getElementById("bottom").innerHTML="<div class='trvbottomarrow' align='center' onclick=scrollLeftVert('a',"+tot+");><a onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image51','','"+img1+"',1);><img src="+img22+" alt='Arrow' name='Image51' width='31' height='29' border='0' id='Image51' /></a></div>";valend=document.getElementById("bot_text").value;vaarend=valend.split(",");end=vaarend[1];if(end<=0){var img11=CONFIG_HOME_URL+"images/vav_trv_toparrow.jpg";document.getElementById("up").innerHTML="<div class='trvtoparrow' align='center'><a onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image47','','"+img11+"',1);><img src="+img11+" alt='Arrow' name='Image47' width='31' height='29' border='0' id='Image47' /></a></div>"}document.getElementById("bot_text").value="";document.getElementById("top_text").value=""}function scrollRight(iden){if(iden=="a"){if(ca!=1&&enablescroll==true){enablescroll=false;scrollDiv("tabmaincontent"+iden,RIGHT);fadeDiv("tabmiddlecontent"+iden+(ca-1),FADE_IN);fadeDiv("tabmiddlecontent"+iden+ca,FADE_OUT);ca--}}else{if(cb!=1&&enablescroll==true){enablescroll=false;scrollDiv("tabmaincontent"+iden,RIGHT);fadeDiv("tabmiddlecontent"+iden+(cb-1),FADE_IN);fadeDiv("tabmiddlecontent"+iden+cb,FADE_OUT);cb--}}}var upcountH=1;var downcountH=1;function scRight(iden,tot){scrollRight(iden);img=CONFIG_HOME_URL+"images/rarrow.png";img1=CONFIG_HOME_URL+"images/rarrow1.png";document.getElementById("bottomH").innerHTML="<div class='tabrightarrow' id='tabrightarrow'  onclick=scLeft('"+iden+"',"+tot+"); ><div class='hptabarrow'></div><div><a onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image54','','"+img1+"',1);><img src="+img+" alt='Arrow' name='Image54' width='22' height='32' border='0' id='Image54' /></a></div></div>";valend=document.getElementById("top_text").value;vaarend=valend.split(",");end=vaarend[1];if(end<=0){img=CONFIG_HOME_URL+"images/larrow.png";document.getElementById("upH").innerHTML="<div class='tableftarrow' id='tableftarrow'><div class='hptabarrow'></div><div><a  onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image53','','"+img+"',1);><img src="+img+" alt='Arrow' name='Image53' width='22' height='32' border='0' id='Image53'  /></a></div></div>"}document.getElementById("bot_text").value="";document.getElementById("top_text").value=""}function scLeft(iden,tot){scrollLeft(iden);valstart=document.getElementById("top_text").value;vaarstart=valstart.split(",");start=vaarstart[0];img=CONFIG_HOME_URL+"images/larrow.png";img1=CONFIG_HOME_URL+"images/larrow1.png";document.getElementById("upH").innerHTML="<div class='tableftarrow' id='tableftarrow'  onclick=scRight('"+iden+"',"+tot+");><div class='hptabarrow'></div><div><a  onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image53','','"+img1+"',1);><img src="+img+" alt='Arrow' name='Image53' width='22' height='32' border='0' id='Image53'  /></a></div></div>";if(start>=(tot-2)*150){img=CONFIG_HOME_URL+"images/rarrow.png";document.getElementById("bottomH").innerHTML="<div class='tabrightarrow' id='tabrightarrow'><div class='hptabarrow'></div><div><a onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image54','','"+img+"',1);><img src="+img+" alt='Arrow' name='Image54' width='22' height='32' border='0' id='Image54' /></a></div></div>"}document.getElementById("bot_text").value="";document.getElementById("top_text").value=""}var upcountNewv=1;var downcountNewv=1;function scRightNewv(iden,tot){scrollRight(iden);img=CONFIG_HOME_URL+"images/rarrow.png";img1=CONFIG_HOME_URL+"images/rarrow1.png";document.getElementById("bottomH1").innerHTML="<div class='tabrightarrow' id='tabrightarrow'  onclick=scLeftNewv('"+iden+"',"+tot+"); ><div class='hptabarrow'></div><div><a onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image154','','"+img1+"',1);><img src="+img+" alt='Arrow' name='Image154' width='22' height='32' border='0' id='Image154' /></a></div></div>";valend=document.getElementById("top_text").value;vaarend=valend.split(",");end=vaarend[1];if(end<=0){img=CONFIG_HOME_URL+"images/larrow.png";document.getElementById("upH1").innerHTML="<div class='tableftarrow' id='tableftarrow'><div class='hptabarrow'></div><div><a  onmouseout=MM_swapImgRestore(); onmouseover=MM_swapImage('Image153','','"+img+"',1);><img src="+img+" alt='Arrow' name='Image153' width='22' height='32' border='0' id='Image153'  /></a></div></div>"}document.getElementById("bot_text").value="";document.getElementById("top_text").value=""}function scLeftNewv(iden,tot){scrollLeft(iden);img=CONFIG_HOME_URL+"images/larrow.png";img1=CONFIG_HOME_URL+"images/larrow1.png";document.getElementById("upH1").innerHTML="<div class='tableftarrow' id='tableftarrow'  onclick=scRightNewv('"+iden+"',"+tot+");><div class='hptabarrow'></div><div><a  onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image153','','"+img1+"',1);><img src="+img+" alt='Arrow' name='Image153' width='22' height='32' border='0' id='Image153'  /></a></div></div>";valstart=document.getElementById("top_text").value;vaarstart=valstart.split(",");start=vaarstart[0];if(start>=(tot-2)*150){img=CONFIG_HOME_URL+"images/rarrow.png";document.getElementById("bottomH1").innerHTML="<div class='tabrightarrow' id='tabrightarrow'><div class='hptabarrow'></div><div><a onmouseout=MM_swapImgRestore() onmouseover=MM_swapImage('Image154','','"+img+"',1);><img src="+img+" alt='Arrow' name='Image154' width='22' height='32' border='0' id='Image154' /></a></div></div>"}document.getElementById("bot_text").value="";document.getElementById("top_text").value=""}function MM_findObj(n,d){var p,i,x;if(!d){d=document}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p)}if(!(x=d[n])&&d.all){x=d.all[n]}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n]}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document)}if(!x&&d.getElementById){x=d.getElementById(n)}return x}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p){d.MM_p=new Array()}var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i]}}}}function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc}}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src}x.src=a[i+2]}}}var xmlHttp;var ERROR_NOTHING="0";function getHTTPObject(){var xmlhttp;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");if(!xmlhttp){xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}}}return xmlhttp}var serverPath=CONFIG_HOME_URL;function serverCall(mode,action,params){var url=serverPath;url=url+mode+"/"+action;var param="";var keys=params["param_keys"];keys=typeof (keys)!="undefined"?keys.split(","):"";if(keys==""){for(var i in params){params[i]=escape(params[i]);param=param+"&"+i+"="+params[i]}}else{for(var i=0;i<keys.length;i++){param=param+"&"+keys[i]+"="+escape(params[keys[i]])}}param=param+"&direct=true";http=getHTTPObject();http.open("POST",url,false);http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");http.send(param);if(http.readyState==4&&http.status==200){var result=http.responseText;resultArray=result.split("@:");return resultArray}}function JSONserverCall(mode,action,params){var param="";var keys=params["param_keys"];keys=typeof (keys)!="undefined"?keys.split(","):"";if(keys==""){for(var i in params){params[i]=escape(params[i]);param=param+"&"+i+"="+params[i]}}else{for(var i=0;i<keys.length;i++){param=param+"&"+keys[i]+"="+escape(params[keys[i]])}}param=param+"&direct=true";http=getHTTPObject();http.open("POST",CONFIG_HOME_URL+mode+"/"+action,false);http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");http.send(param);if(http.readyState==4&&http.status==200){resultArray=YAHOO.lang.JSON.parse(http.responseText);return resultArray}}function Get_Cookie(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null}if(start==-1){return null}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(len,end))}function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"")}function Delete_Cookie(name,path,domain){if(Get_Cookie(name)){document.cookie=name+"="+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function waitAllFlash(varlcId){if(document.all){var players=document.getElementsByTagName("object");for(var i=0;i<players.length;i++){myname=players[i].getAttribute("id");if(!(myname==varlcId)){try{var flashProxy=new FlashProxy(myname,CONFIG_IMAGE_URL+"swf/JavaScriptFlashGateway.swf");flashProxy.call("waitMovie")}catch(e){alert(e)}}}}else{var players=document.getElementsByTagName("embed");for(var i=0;i<players.length;i++){myname=players[i].getAttribute("id");if(!(myname==varlcId)){try{var flashProxy=new FlashProxy(myname,CONFIG_IMAGE_URL+"swf/JavaScriptFlashGateway.swf");flashProxy.call("waitMovie")}catch(e){alert(e)}}}}}function empty_search(){var global_search=document.getElementById("global_search_text");if(global_search.value=="Search for..."){global_search.value=""}}function ursession_search(){var url=CONFIG_HOME_URL;var global_search_text=document.getElementById("global_search_text").value;var module=document.getElementById("module").value;var frm=document.getElementById("global_search");var errormessage="";if(global_search_text==""||global_search_text=="Search for..."){errormessage="Please enter the search text.";highlightErrorField("global_search_text","highlight","")}if(global_search_text!=""&&global_search_text!="Search for..."){highlightErrorField("global_search_text","unhighlight","")}if(errormessage!=""){display_errorMessage(errormessage);return false}else{if(module!=""&&module!="Select"){switch(module){case"VIDEOS":url=url+"urVIDEOS/browse?tags="+global_search_text.replace("&","%26")+"&m_type=V";break;case"MUSIC":url=url+"urVIDEOS/browse?tags="+global_search_text.replace("&","%26")+"&m_type=A";break;case"GROUPS":url=url+"urGROUPS?search="+global_search_text;break;case"COMMUNITY":url=url+"urCOMMUNITY/browse?interest="+global_search_text;break;case"AUDITION":url=url+"AUDITIONS/search?tags="+global_search_text.replace("&","%26")+"&music_type=AUDITION";break;default:errormessage="Please select proper option.";return false;break}}else{url=url+"urHOME/globalSearch?tags="+global_search_text.replace("&","%26")}document.location.href=url}return false}var SEARCHBOX_OPENED=false;function toggleList(where){if(where=="body"&&!SEARCHBOX_OPENED){hideElement("Layer1","closedbox")}if(where=="body"){SEARCHBOX_OPENED=false}if(where=="box"){if(document.getElementById("Layer1").style.visibility=="hidden"){showElement("Layer1","closedbox");document.getElementById("chosen").focus();SEARCHBOX_OPENED=true}else{hideElement("Layer1","closedbox");document.getElementById("module").focus();SEARCHBOX_OPENED=false}}}function dropbox_fill(selected){for(var i=1;i<=6;i++){var previousVal="chosen_"+i;if(selected.id!=previousVal){document.getElementById(previousVal).className="ddbox_activelist"}}document.getElementById("module").value=selected.innerHTML;document.getElementById("chosen").value=selected.innerHTML;selected.className="ddbox_highlightlist";hideElement("Layer1","closedbox")}function showElement(showThis,atThis){var show=document.getElementById(showThis);var element=document.getElementById(atThis);var left=element.x?element.x:getLeft(element);var top=element.y?element.y:getTop(element);if(document.all){show.style.left=(left+1)+"px"}else{show.style.left=(left)+"px"}show.style.top=top+"px";show.style.visibility="visible";element.style.visibility="hidden";function getLeft(element){if(!element){return 0}var left=getLeft(element.offsetParent)+element.offsetLeft;return left}function getTop(element){if(!element){return 0}var top=getTop(element.offsetParent)+element.offsetTop;return top}}function showAd(showThis,atThis,killLeft,killTop,flag){if(flag=="false"){return }var show=document.getElementById(showThis);var element=document.getElementById(atThis);var left=element.x?element.x:getLeft(element);var top=element.y?element.y:getTop(element);left=left-killLeft;top=top-killTop;if(document.all){show.style.left=(left+1)+"px"}else{show.style.left=(left)+"px"}show.style.top=top+"px";show.style.display="block";function getLeft(element){if(!element){return 0}var left=getLeft(element.offsetParent)+element.offsetLeft;return left}function getTop(element){if(!element){return 0}var top=getTop(element.offsetParent)+element.offsetTop;return top}}function hideElement(hideThis,showThis){if(document.getElementById(hideThis)){var hide=document.getElementById(hideThis);var show=document.getElementById(showThis);hide.style.visibility="hidden";show.style.visibility="visible"}}var ddElem=new Array;var matchedElemIndex;var prevKeystroke;var highlightedOption;function getddElements(){var eleArr=document.getElementById("ddbox_contentholder").getElementsByTagName("div");for(var i=0;i<eleArr.length;i++){ddElem[i]=eleArr[i].innerHTML}}function initddSearch(){getddElements()}function ddSearch(str){return(matchFirstLetter(ddElem,str))}function matchFirstLetter(arr,searchStr){var returnArray=false;for(i=0;i<arr.length;i++){if(arr[i].charAt(0).toUpperCase()===searchStr){if(!returnArray){returnArray=[]}returnArray.push(i)}}return returnArray}function getCharCode(e){return(navigator.appName=="Netscape")?e.which:e.keyCode}function checkaction(e,selected){var charCode=getCharCode(e);if(charCode==13){try{document.getElementById("module").value=highlightedOption.innerHTML;highlightedOption.className="ddbox_highlightlist";document.getElementById("chosen").value=highlightedOption.innerHTML;toggleList("box");selected=highlightedOption}catch(e){toggleList("box")}}for(var i=1;i<=6;i++){var previousVal="chosen_"+i;document.getElementById(previousVal).className="ddbox_activelist";if(document.getElementById("module").value==document.getElementById(previousVal).innerHTML){var linkcount=i}}var matchArr=ddSearch(String.fromCharCode(charCode));if(matchArr!=false){if(prevKeystroke==charCode){if(matchedElemIndex<(matchArr.length-1)){matchedElemIndex++;linkcount=matchArr[matchedElemIndex]+1}else{matchedElemIndex=0;linkcount=matchArr[0]+1}}else{linkcount=matchArr[0]+1;matchedElemIndex=0}}if(linkcount>=1&&linkcount<=6){if(charCode==38&&linkcount>1){linkcount=parseInt(linkcount)-1}else{if(charCode==40&&linkcount<6){linkcount=parseInt(linkcount)+1}}var currentVal="chosen_"+linkcount;document.getElementById("module").value=document.getElementById(currentVal).innerHTML;document.getElementById(currentVal).className="ddbox_highlightlist";document.getElementById("chosen").value=document.getElementById(currentVal).innerHTML}if(charCode==9){hideElement("Layer1","closedbox");SEARCHBOX_OPENED=false;if(document.all){if(event.shiftKey){document.getElementById("global_search_text").focus()}else{document.getElementById("global_search_btn").focus()}}}prevKeystroke=charCode;if(document.all){event.returnValue=false}return false}function handle(delta){for(var i=1;i<=6;i++){var previousVal="chosen_"+i;document.getElementById(previousVal).className="ddbox_activelist";if(document.getElementById("module").value==document.getElementById(previousVal).innerHTML){var linkcount=i}}if(delta<0){if(linkcount<=5){linkcount++}}else{if(linkcount>1){linkcount--}}var currentVal="chosen_"+linkcount;document.getElementById("module").value=document.getElementById(currentVal).innerHTML;document.getElementById(currentVal).className="ddbox_highlightlist";document.getElementById("chosen").value=document.getElementById(currentVal).innerHTML}function wheel(event){var delta=0;if(!event){event=window.event}if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta}}else{if(event.detail){delta=-event.detail/3}}if(delta){handle(delta)}if(event.preventDefault){event.preventDefault()}event.returnValue=false}function initMousewheel(ele){if(window.addEventListener){ele.addEventListener("DOMMouseScroll",wheel,false)}}function isVideo(file){var extstr=file.split("/");var filename=extstr[extstr.length-1];var ext=filename.split(".");var extension=ext[ext.length-1].toLowerCase();if(extension!="avi"&&extension!="mov"&&extension!="wmv"&&extension!="mpg"&&extension!="m4v"){return true}else{return false}}function isAudio(file){var extstr=file.split("/");var filename=extstr[extstr.length-1];var ext=filename.split(".");var extension=ext[ext.length-1].toLowerCase();if(extension!="mp3"){return true}else{return false}}function isImage(file){var extstrT=file.split("/");var filenameT=extstrT[extstrT.length-1];var extT=filenameT.split(".");var extensionT=extT[extT.length-1].toLowerCase();if(extensionT!="jpg"&&extensionT!="jpeg"&&extensionT!="gif"&&extensionT!="png"){return true}else{return false}}function dropBoxHighlight(option){option.className="ddbox_highlightlist";highlightedOption=option}function dropBoxUnhighlight(option){if(option.innerHTML!=document.getElementById("module").value){option.className="ddbox_activelist"}}function togglevisibility(){serverCall("urPROFILE","togglevisibility",new Array());document.getElementById("cp_mng_viscontrol_invisible").style.display=(document.getElementById("cp_mng_viscontrol_invisible").style.display=="none")?"inline":"none";document.getElementById("cp_mng_viscontrol_visible").style.display=(document.getElementById("cp_mng_viscontrol_visible").style.display=="none")?"inline":"none";if(typeof ttinvisible=="object"){if(document.getElementById("ttvisible").style.top!=""){document.getElementById("ttinvisible").style.top=document.getElementById("ttvisible").style.top;document.getElementById("ttinvisible").style.left=document.getElementById("ttvisible").style.left}else{if(document.getElementById("ttinvisible").style.top!=""){document.getElementById("ttvisible").style.top=document.getElementById("ttinvisible").style.top;document.getElementById("ttvisible").style.left=document.getElementById("ttinvisible").style.left}}}}