var fTimeout,hint_wind;var lyr_al=getCookieValue("lyr_al");var lyr_ff=getCookieValue("lyr_ff");var lyr_fw=getCookieValue("lyr_fw");var preview_vis=getCookieValue("preview_vis");preview_vis=(preview_vis=="false")?false:true;var preview_type=getCookieValue("preview_type");if(!preview_type){preview_type=1}var click_flags={cust_widget_click:false,aolim_click:false,furl_click:false,reddit_click:false,stumb_click:false,face_click:false,copy_ipod_click:false,copy_flash_video_click:false,copy_flash_click:false,copy_video_click:false,copy_link_click:false,copy_link2_click:false,copy_embed_click:false,del_click:false,digg_click:false,print_click:false,email_click:false,trans_click:false};onLoadFunctionList=new Array();function performOnLoadFunctions(){for(var A in onLoadFunctionList){onLoadFunctionList[A]()}}function _offsetTop(C){var B=C.offsetTop;var A=C.offsetParent;while(A.tagName.toUpperCase()!="BODY"){B+=A.offsetTop;A=A.offsetParent}return B}function _offsetLeft(C){var B=C.offsetLeft;var A=C.offsetParent;while(A.tagName.toUpperCase()!="BODY"){B+=A.offsetLeft;A=A.offsetParent}return B}function callExternalInterface(elt,n){if(fTimeout){clearTimeout(fTimeout);DoHide()}hint_wind=document.getElementById(n);if(youtube_video&&(n=="copy_flash")&&(preview_type!=2)){if(preview_type==3){n="copy_video"}else{if(preview_type==1){n="copy_flash_video"}}}thisMovie("externalInterfaceExample").ClipboardJS(elt.value);if(!eval("click_flags['"+n+"_click']")){copy_click(n)}elt.select();hint_wind.style.display="block";fTimeout=setTimeout("DoHide()",1500)}function HideShowCommentsDiv(D){var A=gE("userComment"+D);var C=gE("userImg"+D);var B=gE("refUserLink"+D);if(A.className.indexOf("visible")==-1){A.className="visible";B.innerHTML="Hide"}else{A.className="hidden";B.innerHTML="Show"}if(C.className.indexOf("visible")==-1){C.className="visible"}else{C.className="hidden"}}function load_options(){document.getElementById("widgets").style.display=(preview_vis===true)?"block":"none";if(youtube_video){document.getElementById("rb"+preview_type).checked="true";change_preview(preview_type)}document.getElementById("hide_link_id").innerHTML=(preview_vis===true)?'<img id="img_arr_id" src="/i/arr_u.gif" align="middle" border="0" alt="Hide preview" width="18" height="18">':'<img id="img_arr_id" src="/i/arr_d.gif" align="middle" border="0" alt="Show preview" width="18" height="18">'}function hide_preview(){if(preview_vis===true){document.getElementById("widgets").style.display="none";document.getElementById("hide_link_id").innerHTML='<img id="img_arr_id" src="/i/arr_d.gif" align="middle" border="0" alt="Show widget preview" width="18" height="18">'}else{document.getElementById("widgets").style.display="block";document.getElementById("hide_link_id").innerHTML='<img id="img_arr_id" src="/i/arr_u.gif" align="middle" border="0" alt="Hide widget preview" width="18" height="18">'}preview_vis=(preview_vis===true)?false:true;if(preview_vis===true&&youtube_video){change_preview(preview_type)}var A=new Date();A.setMonth(A.getMonth()+6);setCookie("preview_vis",preview_vis,"/",A.toGMTString())}function showFormLogin(C,D,A){var B=document.getElementById("login_register");document.getElementById("login_register").style.display="block";document.getElementById("login_register").style.top=_offsetTop(C)+D+"px";document.getElementById("login_register").style.left=_offsetLeft(C)-A+"px"}function setOpacity(B,A){B.style.MozOpacity=A/100;B.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+A+")"}function showForm(B,A){gE("iReportTab").className="report current";gE("iReportTab").innerHTML="Report";gE("iShareTab").className="share";gE("iShareTab").innerHTML='<a href="javascript:void(0)" onclick="CancelBadRep()">Share</a>';gE("shareTab").style.display="none";document.getElementById(B).style.display="block";if(A!="yt"){document.getElementById(A+"_cancel").focus()}document.getElementById(A+"_text").focus()}function CancelBadRep(){document.getElementById("cor_lyr").style.display="none";gE("iReportTab").className="report";gE("iShareTab").className="share current";gE("shareTab").style.display="block";gE("cor_lyr").style.display="none";gE("iReportTab").innerHTML="<a href=\"javascript:void(0)\" onclick=\"showForm('cor_lyr','br')\">Report</a>";gE("iShareTab").innerHTML="Share"}function rep_change(){if(document.getElementById("br_text").value.replace(/[\ \n\r\t]{2,}/," ").length>3){document.getElementById("br_but").disabled=false}else{document.getElementById("br_but").disabled=true}}function DoHide(){hint_wind.style.display="none"}function copy_click(n){var req=new Subsys_JsHttpRequest_Js();req.onreadystatechange=function(){if((req.readyState==4)&&(req.responseJS)){if(req.responseJS.ok){eval("click_flags['"+n+"_click'] = true")}}};req.caching=false;req.open("GET","/code/copy_click.php",true);req.send({inq:n})}function thisMovie(A){if(navigator.appName.indexOf("Microsoft")!=-1){return window[A]}else{return document[A]}}function change_align(B){var A=new Array("left","center","right");document.getElementById("songlyrics").align=B;for(i=0;i<3;i++){if(B==A[i]){document.getElementById("id_"+A[i]).style.borderColor="#999999";lyr_al=B}else{document.getElementById("id_"+A[i]).style.borderColor="#F7F7F7"}}save_options()}function save_options(){var A=new Date();A.setMonth(A.getMonth()+6);setCookie("lyr_al",lyr_al,"/",A.toGMTString());setCookie("lyr_ff",document.getElementById("ff_select").selectedIndex,"/",A.toGMTString());setCookie("lyr_fw",document.getElementById("fw_select").selectedIndex,"/",A.toGMTString())}function change_preview(B){B=parseInt(B);document.getElementById("lrb"+preview_type).className="smg";document.getElementById("lrb"+B).className="smg_u";if(preview_vis===true){switch(B){case 1:document.getElementById("videowidget").style.display="block";document.getElementById("videowidget").style.borderBottom="";document.getElementById("flashpreview").style.display="block";break;case 2:document.getElementById("videowidget").style.display="none";document.getElementById("flashpreview").style.display="block";break;case 3:document.getElementById("videowidget").style.display="block";document.getElementById("videowidget").style.borderBottom="1px solid #FF6600";document.getElementById("flashpreview").style.display="none";break}}switch(B){case 1:document.getElementById("code_input").value=lv_code;break;case 2:document.getElementById("code_input").value=l_code;break;case 3:document.getElementById("code_input").value=v_code;break}preview_type=B;var A=new Date();A.setMonth(A.getMonth()+6);setCookie("preview_type",preview_type,"/",A.toGMTString())}function open_custom(){if(!eval("click_flags['cust_widget_click']")){copy_click("cust_widget")}var hgt=youtube_video?610:415;var wdt=730;var ptop=(screen.height-hgt)/2;var pleft=(screen.width-wdt)/2;window.open("/about/widget.php?song_id="+song_id,"","width="+wdt+",height="+hgt+",scrollbars=no,resizable=no,status=no,location=no,top="+ptop+",left="+pleft)}function open_email(){if(!eval("click_flags['email_click']")){copy_click("email")}var hgt=400;var wdt=730;var ptop=(screen.height-hgt)/2;var pleft=(screen.width-wdt)/2;window.open("/mailto.php?songid="+song_id,"","width="+wdt+",height="+hgt+",scrollbars=no,resizable=no,status=no,location=no,top="+ptop+",left="+pleft)}function gotoPage(A){getUrlXMLResponse("/operations.php?a=gotoPage&songid="+song_id+"&curpage="+A,function(C){var B=getNodeValue(C.responseXML.documentElement,"html_content");document.getElementById("usersMeanings").innerHTML=B})}function vote(valuemean,z){var voteInt,color;if(!isLogged){alert("Please, login or register to vote for the meanings");return }getUrlXMLResponse("/operations.php?a=vote&songid="+song_id+"&valuemean="+valuemean+"&meanid="+z,function(xmlHttpReq){var js_code=getNodeValue(xmlHttpReq.responseXML.documentElement,"js_code");if(js_code!=""){eval(js_code)}var html_content=getNodeValue(xmlHttpReq.responseXML.documentElement,"html_content");if(html_content!=""){voteInt=parseInt(html_content);color=voteInt>0?"#2474AD":"#A71212";html_content=!voteInt?"":(voteInt>0?("+"+voteInt.toString()):voteInt);gE("voteValue"+z).style.color=color;gE("voteValue"+z).innerHTML=html_content}})}function badRep(A){if(!isLogged){alert("Please, login or register to report bad meanings");return }popupWin=window.open("/operations.php?a=badrep&meanid="+A,"","width=500, height=300, scrollbars=no,resizable=no,status=no,location=no,top=200,left=300");popupWin.focus()}function strip_tags(A){return A.replace(/<\/?[^>]+>/gi,"")}function trim(A){return rtrim(ltrim(A))}function ltrim(A){return A.replace(/^\s+/,"")}function rtrim(A){return A.replace(/\s+$/,"")}function ChkInputData(){var A;snd=document.frmSendMean.text.value.toString();snd=trim(snd);A=snd.length;snd=strip_tags(snd);if((snd.length!=A)&&(snd.length<50)){alert("HTML tags aren't allowed!");document.frmSendMean.text.focus();return false}if(snd.length<50){alert("Your meaning should be 50 letters at least!");document.frmSendMean.text.focus();return false}}function str_replace(B,C,A){return A.split(B).join(C)}function GoToForm(){var A=getCookieValue("textMeanings")?true:false;var B=getCookieValue("meaningsIdSong");if(song_id!=B){return }else{if(A){document.frmSendMean.post.focus();document.frmSendMean.text.value=str_replace("+"," ",getCookieValue("textMeanings"));setCookie("textMeanings","","/");setCookie("meaningsIdSong","","/")}}}function ClkTranslate(){copy_click("trans");var A=document.getElementById("iLngTo");if(A.value=="0"){alert("please select language for translate");return false}return true}var UT_RATING_IMG=new Image();UT_RATING_IMG.src="/i/star_bg_yellow_s.gif";var UT_RATING_IMG_BG=new Image();UT_RATING_IMG_BG.src="/i/star_bg_wh_s.gif";function UTRating(A,L,F,M,C,J,P){this.ratingElementId=A;this.maxStars=L;this.objectName=F;this.formName=M;this.ratingMessageId=C;this.componentSuffix=J;this.starTimer=null;this.starCount=0;function K(Q,R){this.clearStarTimer();this.greyStars();this.colorStars(Q)}function B(Q){if(type_rating=="song"){messages=new Array("Rate this video","Poor","Nothing special","Worth watching","Pretty cool","Awesome!")}else{if(type_rating=="playlist"){messages=new Array("Rate this playlist","Poor","Nothing special","Worth watching","Pretty cool","Awesome!")}else{messages=new Array("Rate this image","Poor","Nothing special","Worth watching","Pretty cool","Awesome!")}}document.getElementById(this.ratingMessageId).innerHTML=messages[Q]}function E(R){for(var Q=0;Q<R;Q++){document.getElementById("star_"+this.componentSuffix+"_"+(Q+1)).src=UT_RATING_IMG.src}}function I(){for(var Q=0;Q<this.maxStars;Q++){if(Q<=this.starCount){document.getElementById("star_"+this.componentSuffix+"_"+(Q+1)).src=UT_RATING_IMG_BG.src}else{document.getElementById("star_"+this.componentSuffix+"_"+(Q+1)).src=UT_RATING_IMG_BG.src}}}function G(Q){this.starCount=Q;this.drawStars(Q);document.forms[this.formName]["rating"].value=this.starCount;var R=this.ratingElementId;postForm(this.formName,true,function(S){replaceDivContents(S,R)})}function O(Q,R){this.starCount=Q;this.showStars(Q,R)}function N(){this.starTimer=setTimeout(this.objectName+".resetStars()",0)}function D(){this.clearStarTimer();if(this.starCount){this.drawStars(this.starCount)}else{this.greyStars()}}function H(){if(this.starTimer){clearTimeout(this.starTimer);this.starTimer=null}}this.clearStars=N;this.clearStarTimer=H;this.greyStars=I;this.colorStars=E;this.resetStars=D;this.setStars=G;this.drawStars=O;this.showStars=K;this.setMessage=B}function ChkInputDataBad(){var A;snd=document.getElementById("br_text").value;snd=trim(snd);A=snd.length;snd=strip_tags(snd);if((snd.length!=A)){return 1}return 0}function Clk_BadReportSend(){if(ChkInputDataBad()==0){CancelBadRep();popupWin=window.open("/report.php?song="+song_id+"&type=lyrics&reason="+document.getElementById("br_text").value,"","width=500, height=300, scrollbars=no,resizable=no,status=no,location=no,top=200,left=300");popupWin.focus();return false}else{alert("HTML tags aren't allowed!")}}function GetGTranslate(){getUrlXMLResponse("/operations/gtranslate_ops.php?songid="+song_id,function(B){var A=getNodeValue(B.responseXML.documentElement,"html_content");document.getElementById("translate_lyr").innerHTML=A})};