// JavaScript Document - to make it dynamic it is saved as JSP file //Funtion to hide the links on the web page when any action is performed. function hideLinks(_event) { if(_event.srcElement.nodeName == 'A' || _event.srcElement.nodeName == 'a'){ if(_event.srcElement.id.indexOf("playButton") > -1){ return; } else { // Variables var anchorTags = document.getElementsByTagName("a"); var i = 0; // Loop through anchor tags for( i = 0; i < anchorTags.length; i++ ) { anchorTags[i].disabled=true; } } } } //player //var time = setTimeout('TimeOut()', 5000); var lastItem = null; var time = null; function PlayTrackOld(path,e) { if (lastItem != null && lastItem != e){ // handle previous item lastItem.className = "tuneButtonPlay"; lastItem.title = "Play"; } lastItem = e; if (e.className == "tuneButtonPlay") { e.className = "tuneButtonStop"; e.title = "Stop"; var currentURL = document.location.href; //alert(currentURL); var playServletURLPrefix = getPrefix(currentURL); //alert(playServletURLPrefix); path = playServletURLPrefix + path //alert(path); BindPlayer(path); clearTimeout(time); time = setTimeout('BindPlayer(\'+path+\')', 30000); return false; // } else { StopTrack(); clearTimeout(time); e.className = "tuneButtonPlay"; e.title = "Play"; } } function getPrefix(currentURL) { var retPrefix = ''; var arr = new Array(); arr = currentURL.split('/'); //alert(arr); //alert(arr.length); // remove the 2 last strings , for example : public/home.jsf for(i=0;i
"; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; document.getElementById("player").innerHTML = winContent_; } else if ((navigator.userAgent.indexOf('Opera') != -1) || (navigator.userAgent.indexOf('Netscape') != -1)) { var winContent_ = "

" + path+ "


"; winContent_ +=""; winContent_ +=""; winContent_ +=""; winContent_ +=""; winContent_ +=""; winContent_ +=""; document.getElementById("player").innerHTML = winContent_; } else { var winContent_ = "

" + path + "


"; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; winContent_ += ""; document.getElementById("player").innerHTML = winContent_; } //alert(document.getElementById("player").innerHTML); } //******************* for help page *************************// function showhelpdesc(id) { //alert(document.getElementById("helpdesc_"+id).className) if(document.getElementById("helpdesc_"+id).className=='helpdesc none') { document.getElementById("helpdesc_"+id).className='helpdesc block'; document.getElementById("side_"+id).className='side'; document.getElementById("txt_"+id).className='TtlOpenQuestion'; } else { document.getElementById("helpdesc_"+id).className='helpdesc none'; document.getElementById("side_"+id).className='sideclose'; document.getElementById("txt_"+id).className='txt'; } } //******************* NOT USED: pop up windows *************************// function funDialAssContInfo(){ window.open("funDialAssContInfo.html", "", "left=10,top=10,width=650,height=600,resizable=no,scaleable=yes,status=yes,scrollbars=yes"); } function funDialAssGroupInfo(){ window.open("funDialAssGroupInfo.html", "", "left=10,top=10,width=650,height=600,resizable=no,scaleable=yes,status=yes,scrollbars=yes"); } function funDialAssAllcallers(){ window.open("funDialAssAllcallers.html", "", "left=10,top=10,width=650,height=600,resizable=no,scaleable=yes,status=yes,scrollbars=yes"); } function funDialTunesList(){ window.open("funDialTunesList.html", "", "left=10,top=10,width=650,height=600,resizable=no,scaleable=yes,status=yes,scrollbars=yes"); } function playListAssignTunes(){ window.open("playListAssignTunes.html", "", "left=10,top=10,width=650,height=240,resizable=no,scaleable=yes,status=yes,scrollbars=no"); } function errorPopUp(){ window.open("errorPopUp.html", "", "left=10,top=10,width=650,height=240,resizable=no,scaleable=yes,status=yes,scrollbars=no"); } //******************* Generic open window *************************// function openWindow(url,wName,params){ url=url.trim(); if(url == "") url="../public/error.jsp" window.open(url,wName,params); } //****** TODO: update external price list function to create window by screen size **********// function openExternalPriceList(url,wName) { params='width=750,height=460,resizable=0'; openWindow(url, wName, params); } //******************* Navigation menu for side and top bar *************************// function findNavElement(sectionNum, level){ var c = 20; for(var i=0;i