<!-- Begin
            function playRadio(form) {
			var jukebox = null;
			
			var winPopWidth = "700";
			var winPopHeight = "470";
			
		   var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
		   var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
			
			
                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
                

                    var URL = "/khalsa/sharedFiles/linktracker.aspx?name=" + form.ptbsRadio.options[form.ptbsRadio.selectedIndex].value;
                        jukebox = window.open(URL,"jukebox",windowprops);                        
						jukebox.window.focus();
                }

            function playRadioII(radioName) {
			var jukebox = null;
			
			var winPopWidth = "700";
			var winPopHeight = "470";
			
		   var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
		   var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
			
			
                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
                

                    var URL = "/khalsa/sharedFiles/linktracker.aspx?name=" + radioName;
                        jukebox = window.open(URL,"jukebox",windowprops);                        
						jukebox.window.focus();
                }
                
                
            function playRadioIII(radioName) {
			var jukebox = null;
			
			var winPopWidth = "700";
			var winPopHeight = "470";
			
		   var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
		   var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
			
			
                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
                

                    var URL = radioName;
                        jukebox = window.open(URL,"jukebox",windowprops);                        
						jukebox.window.focus();
                }                
                
                

            function playJukeboxRadio(strURL) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=jukebox&PlayUsingRealPlayer=1&artistName=Playing Your Selections!&songFilePath=" + strURL;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }

       
            function playSikhPrayers(strPaathFileName) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?PlayUsingRealPlayer=1&artistName=" + strPaathFileName +"&SikhPrayersPaathName=" + strPaathFileName;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }

        
            function playShabadLibraryJukebox(strURL) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		    
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=SHABADLIBRARY&PlayUsingRealPlayer=1&artistName=Playing Your Selections!&shabadURL=" + strURL;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }

            function playSGGSJIAudios(audioSetNum,sggsjiPageNo) {
				    var jukebox = null;
					var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		    
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=SGGSJIAudio&PlayUsingRealPlayer=1&artistName=SGGSJI " + sggsjiPageNo  + "&strURL=" + sggsjiPageNo  + "&audioSetNum=" + audioSetNum;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					   jukebox.window.focus();
			                }


            function playSGGSJIAudiosII(sggsjiPageNo) {
				    var jukebox = null;
					var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

		                var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=LEARNSGGSJIPAGEBYPAGE&artistName=Learn%20Siri%20Guru%20Granth%20Sahib%20Ji&PlayUsingRealPlayer=1&sggsjipagenum=" + sggsjiPageNo;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					   jukebox.window.focus();
			                }


            function playBanisSGGSJIAudios(sggsjiPageNo) {
				    var jukebox = null;
					var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		                
		                       var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=BanisSGGSJIAudio&PlayUsingRealPlayer=1&artistName=Playing Your Selections!&strURL=" + sggsjiPageNo;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }


			function LOADJUKEBOX() {
					songid = new Array;
					count = 0;
					for (var i=0;i<document.ptbsForm.elements.length;i++) {
							if (document.ptbsForm.elements[i].name == 'meta') {
									if (document.ptbsForm.elements[i].checked) {
									    if (count<18) {//just take Ist 18 songs inorder to avoid Invalid Pointer Error ... uppal
                                		songid[count] =document.ptbsForm.elements[i].value;
                                		count ++;
                                	}}}}

					paramaters = "";
					
					for (var j=0;j<count;j++) {			
						if (j == count-1){
							paramaters += songid[j];
						}else
						{
							paramaters += songid[j]+",";
						}
					}
							//document.write("paramaters:    "+paramaters)
								if (paramaters != "") {
									playJukeboxRadioII(paramaters);					
									return false;
								}
			}

            function playJukeboxRadioII(selectedsonglist) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
	   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=jukebox&PlayUsingRealPlayer=1&selectedsonglist=" + selectedsonglist;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }
            
 
			function LOADJUKEBOX4SearchShabad(whichDb2Use) {
					songid = new Array;
					count = 0;
					for (var i=0;i<document.ptbsForm.elements.length;i++) {
							if (document.ptbsForm.elements[i].name == 'meta') {
									if (document.ptbsForm.elements[i].checked) {
									    if (count<18) {//just take Ist 18 songs inorder to avoid Invalid Pointer Error ... uppal
                                		songid[count] =document.ptbsForm.elements[i].value;
                                		count ++;
                                	}}}}

					paramaters = "";
					
					for (var j=0;j<count;j++) {			
						if (j == count-1){
							paramaters += songid[j];
						}else
						{
							paramaters += songid[j]+",";
						}
					}
							//document.write("paramaters:    "+paramaters)
								if (paramaters != "") {
									playJukeboxRadio4SearchShabad(whichDb2Use,paramaters);					
									return false;
								}
			}

            function playJukeboxRadio4SearchShabad(whichDb2Use,selectedsonglist) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
	   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?radio=jukebox&PlayUsingRealPlayer=1&searchShabadEngineJukebox=1&nwhichDb2Use=" + whichDb2Use + "&selectedsonglist=" + selectedsonglist;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }
            
  
			function LOADJUKEBOX4XMLData(datasetName,videoRealPlayerFlag) {
					songid = new Array;
					count = 0;
					for (var i=0;i<document.ptbsForm.elements.length;i++) {
							if (document.ptbsForm.elements[i].name == 'meta') {
									if (document.ptbsForm.elements[i].checked) {				
									    if (count<18) {//just take Ist 18 songs inorder to avoid Invalid Pointer Error ... uppal
                                		songid[count] =document.ptbsForm.elements[i].value;
                                		count ++;
                                	}}}}

					paramaters = "";
					
					for (var j=0;j<count;j++) {			
						if (j == count-1){
							paramaters += songid[j];
						}else
						{
							paramaters += songid[j]+",";
						}
					}
							//document.write("paramaters:    "+paramaters)
								if (paramaters != "") {								        
									playJukeboxRadio4XMLData(paramaters,datasetName,videoRealPlayerFlag);					
									return false;
								}
			}
			 
            function playJukeboxRadio4XMLData(selectedsonglist,datasetName,videoRealPlayerFlag) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
	   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?videoRealPlayerFlag=" + videoRealPlayerFlag + "&datasetName=" + datasetName + "&radio=jukebox&PlayUsingRealPlayer=1&selectedsonglist=" + selectedsonglist;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }
            
//For windows player jukebox - play using windows player
 
			function LOADJUKEBOX4XMLData4WinPlayer(datasetName,videoWindowPlayerFlag) {
					songid = new Array;
					count = 0;
					for (var i=0;i<document.ptbsForm.elements.length;i++) {
							if (document.ptbsForm.elements[i].name == 'meta') {
									if (document.ptbsForm.elements[i].checked) {				
									    if (count<18) {//just take Ist 18 songs inorder to avoid Invalid Pointer Error ... uppal
                                		songid[count] =document.ptbsForm.elements[i].value;
                                		count ++;
                                	}}}}

					paramaters = "";
					
					for (var j=0;j<count;j++) {			
						if (j == count-1){
							paramaters += songid[j];
						}else
						{
							paramaters += songid[j]+",";
						}
					}
							//document.write("paramaters:    "+paramaters)
								if (paramaters != "") {	
									playJukeboxRadio4XMLData4WinPlayer(paramaters,datasetName,videoWindowPlayerFlag);					
									return false;
								}
			}
			 
            function playJukeboxRadio4XMLData4WinPlayer(selectedsonglist,datasetName,videoWindowPlayerFlag) {
					var jukebox = null;
		 			var winPopWidth = "700";
					var winPopHeight = "470";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
	   
		                    var URL = "/khalsa/sharedfiles/CustomPTBSRadio.aspx?videoRealPlayerFlag=" + videoWindowPlayerFlag + "&datasetName=" + datasetName + "&radio=jukebox&PlayUsingWindowsPlayer=1&PlayUsingRealPlayer=0&PTBSWindowsJukebox=1&selectedsonglist=" + selectedsonglist;
		                        jukebox = window.open(URL,"jukebox",windowprops);
					    jukebox.window.focus();
                }
            
            
            function photoGallery(strURL) {
					var jukebox = null;
		 			var winPopWidth = "850";
					var winPopHeight = "575";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top="+winUpPosition
		                + "scrollbars=no,menubars=no,toolbars=no,resizable=yes";
		   
                    var URL = "/khalsa/sharedFiles/linktracker.aspx?name=" + strURL;
		                        jukebox = window.open(URL,"photoGallery",windowprops);
								//photoGallery.window.focus();
                }
            
            function downloadPTBSFonts() {
					var winFonts = null;
		 			var winPopWidth = "600";
					var winPopHeight = "300";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top="+winUpPosition
		                + "scrollbars=yes,menubars=no,toolbars=no,resizable=yes";
		   
                    var URL = "/khalsa/sharedFiles/linktracker.aspx?name=DownLoadPTBSFonts";
		                        jukebox = window.open(URL,"winPTBSFonts",windowprops);								
                }
                
                
            function downloadPTBSGurukhiUnicodeFonts() {
					var winFonts = null;
		 			var winPopWidth = "600";
					var winPopHeight = "300";
					
				    var winleftPosition 		= (parseInt(window.screen.width) - winPopWidth) / 2;
				    var winUpPosition 		= (parseInt(window.screen.height) - winPopHeight) / 2;
					
					
		                var windowprops = "width="+ winPopWidth +",height="+winPopHeight+",left="+winleftPosition+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top="+winUpPosition
		                + "scrollbars=yes,menubars=no,toolbars=no,resizable=yes";
		   
                    var URL = "/khalsa/sharedFiles/linktracker.aspx?name=downloadPTBSGurukhiUnicodeFonts";
		                        jukebox = window.open(URL,"winPTBSFonts",windowprops);								
                }
                                
                
 /*Reference: http://www.xefteri.com/articles/nov042002/default.aspx
    Topic: Creating clickable table rows in ASP.NET that change colors
    
    We capture the event that fired the Javascript, namely the span, and
    use Javascript's parentElement to travel upwards in the DOM hierarchy until it finds a <tr> tag.
    The first one we find must be the row in question, so we capture it and then change its color.
  */

        //declare global variables
        var rowsSelected = 0; //counts how many rows have been clicked

        //change the background color of a row when selected and
        //also count how many rows are selected
        function colorRow(srcElement)
        {
        var cb = event.srcElement;
        var curElement = cb;
        while (curElement && !(curElement.tagName == "TR"))
        {
            curElement = curElement.parentElement;
        }
        if (!(curElement == cb) && (cb.name != "cbxSelectAll"))
        {
            if (cb.checked)
            {
            //curElement.style.backgroundColor = "gold";
            curElement.style.backgroundColor = "lightcoral";
            curElement.style.color='white'; 
            rowsSelected = rowsSelected + 1;
            }
            else
            {
            curElement.style.backgroundColor = "White";
            //curElement.style.backgroundColor = "#DEDFDE";
            curElement.style.color='#003399'; 
            rowsSelected = rowsSelected - 1;
            }
        }
        }

  //Reference: http://www.xefteri.com/articles/nov042002/default.aspx 
  //color all rows when the main checkbox is clicked
  /*
  This function does basically the same one as the colorRow(),
  except that it excludes the cbxSelectAll checkbox row from being highlighted.
  The internal variable thisNumRowsSelected counts the total number of rows selected,
  and sets it equal to the global rowsSelected variable at the end of the function.  
  */
            function checkAll(form)
            {
            var thisNumRowsSelected = 0;
            var isChecked = document.all.cbxSelectAll.checked;
            for (var i=0; i < form.elements.length; i++)
            {
                if (form.elements[i].name.indexOf('_ctl') > -1)
                {
                var curElement = form.elements[i];
                if (isChecked)
                {
                    curElement.checked = true;
                    thisNumRowsSelected = thisNumRowsSelected + 1;
                    while (!(curElement.tagName == "TR"))
                    {
                    curElement = curElement.parentElement;
                    }
                    if (form.elements[i].name != "cbxSelectAll")
                    {
                    curElement.style.backgroundColor = "gold";
                    }
                }
                else
                {
                    curElement.checked = false;
                    while (!(curElement.tagName == "TR"))
                    {
                    curElement = curElement.parentElement;
                    }
                    if (form.elements[i].name != "cbxSelectAll")
                    {
                    curElement.style.backgroundColor = "#eeeeee";
                    }
                }
                }
            }
            rowsSelected = thisNumRowsSelected;
            }                
                
 
                           
                                
              /*
			 	No frames please
				*/  
                if (window != top) top.location.href = location.href;
                        
 			
			/*
			No rightclick / No alert in IE and NN
			*/

			//This block will capture the right click and discard it

			if (window.Event) // Only Netscape will have the CAPITAL E.
			document.captureEvents(Event.MOUSEUP); // catch the mouse up event
			function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
			{
			        event.cancelBubble = true
			        event.returnValue = false;
			        return false;
			}
			function norightclick(e) // This function is used by all others
			{
			        if (window.Event) // again, IE or NAV?
			  {
			      if (e.which == 2 || e.which == 3)return false;}
			        else
			        if (event.button == 2 || event.button == 3)
			  {
			      event.cancelBubble = true
			          event.returnValue = false;
			          return false;
			         }
			}
			 
			document.oncontextmenu = nocontextmenu;  // for IE5+
			document.onmousedown = norightclick;  // for all others
			 
// End -->

