			var HIGHLIGHT_COLOR = '#00CCFF';
			var UNHIGHLIGHT_COLOR = '#FFFFFF';
			
			
			var ie;
			var mozilla;
			var opera;
			var netscape;
							
			var buttonNames;
			var timeOut;
			
			
			function DoDisabling()
			{
				var button;
				var i;				
			 				
				if (document.getElementById)
				{										
					for (i = 0; i < buttonNames.length; i++)
					{						
						button = document.getElementById(buttonNames[i]);
																		 									
						if (button)
						{
							button.disabled = true;
						}												
					}																										
				}						
			}
	
	
			function DisableButtons(buttnNames)
			{										
				
				buttonNames = new Array();										
				buttonNames = buttnNames.concat();
				timeOut = setTimeout("DoDisabling()",100);								
			}
									
			
			function EnableButton(buttonId)
			{						
				if (document.getElementById)
				{										
					button = document.getElementById(buttonId);
																		 									
					if (button)
					{						
						button.disabled = false;
					}																								
				}						
			}
				
				
			function DisplayRow(row)
			{											
				if (ie)
				{								
					row.style.display = "block";					
				}
				else
				{	
					row.style.display = "table-row";	
				}								
			}
	
	
			function HideRow(row)
			{		
				row.style.display = "none";
			}
	
	/*
	window.onbeforeunload = function () {
   // stuff do do before the window is unloaded here.
   
  // return "Are u sure?";
}
*/
	
		function SetBrowser()
		{
			// Mozilla  Netscape   Mozilla
			// Opera    Opera      Mozilla
			// IE       In E       Mozilla
			// Netscape  ?         ?
		
			ie = false;
			mozilla = false;
			opera = false;
			netscape = false;
			
			if (navigator.appName.indexOf("Internet Explorer") != -1)
			{
				ie = true;
			} else if (navigator.appName.indexOf("Opera") != -1)
			{
				opera = true;
			} else if (navigator.appName.indexOf("Netscape") != -1)
			{
				mozilla = true;
			}		
		}
		
		
		
		function GetQueryStringValue(key)
		{    
			// var q = unescape(location.search.substr(1)).split('&');    
		
			var keyValuePairs;
			
			var keyValuePairs = unescape(location.search.substr(1)).split('&');
			
			for(var i=0; i<keyValuePairs.length; i++)
			{   
				var pair;
				     
				pair = keyValuePairs[i].split('=');        
				
				if(pair[0].toLowerCase() == key.toLowerCase())
				{
					return pair[1];    
				}
			}
	
			return '';
		
		}
			
								
		function CheckForEmptyTextBox (textBoxId,textBoxLabel,errMessage)
	   {
			var textBox;
									
			textBox = document.getElementById(textBoxId);
	   
			if (textBox.value == "")
			{	
				textBox.style.backgroundColor = HIGHLIGHT_COLOR;
				
				if (errMessage	== "")
				{				
					textBox.focus();
				}
				
				errMessage += "Please enter your " + textBoxLabel + ".\n";															
			}
			else
			{
				textBox.style.backgroundColor = UNHIGHLIGHT_COLOR;
			}
			
			return errMessage;
	   }
	   
	   
	   function SetFocus(cntrlId)
	   {
			var cntrl;
			
			cntrl = document.getElementById(cntrlId);
					 
			if (cntrl)
			{			
				cntrl.focus();			
			}				
	   }
	   
	   
	   function SetObjectFocus(object)
	   {					
			object.focus();							
	   }
	   
	   function SelectText(textBoxId)
	   {
			var textBox;
			
			textBox = document.getElementById(textBoxId);
		
			if (textBox)
			{					
				textBox.focus();
				textBox.select();
			}													
	   }	   			 	     
	 
	 
       function AlertUser(msg)
	   {	   
			alert(msg.replace(/%/g,"\n"));								
	   }	   		    
			   
// Hide script from older browsers 
     // script by http://www.hypergurl.com 

// var urlAddress = "http://www.pjsubs.com";
// var pageName = "Subs The Right Way!";


/* todo1 :
function addToFavorites() 
{ 
    if (window.external)
    { 
       window.external.AddFavorite(urlAddress,pageName);
    } 
    else
    {
      alert("Sorry! Your browser doesn't support this function."); 
    } 
}
*/ 
