/*
 * This function is required to pop-up a window defined through the HTML Editor
 * as new window pop-up hyperlink 
 */
function openLink(URI,w,h)
{
win =window.open(URI,"secWin","width="+w+",height="+h+",left=100,borders=no,scrollbars=yes,resizable=yes,location=no");
win.focus;
}

/*
 * This function is required to pop-up the Voting Polls window fro the Home Page 
 */
function showNewWindow(PageName, WindowName, WindowWidth, WindowHeight, VarResizable,ScrollBar)
			{	
window.open(PageName,WindowName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=' + ScrollBar + ',resizable=' + VarResizable + ',width=' + WindowWidth + ',height=' + WindowHeight);

/*
 * This function is required for the Weather Network component on the Home Page 
 */			}
function getCity(param) 
{					
		if (navigator.appName != "Netscape") 
		{							
				document.all["showCity"].style.display = '';
				document.all["searchForCity"].style.display = '';			
				var pairs=unescape(location.search.substring(1).replace(/\+/g," ")).split('&');
				var startI = 1;				
				if (pairs[0].substring(0,7) == '')
				{
					startI = 0;
				}
				for (var i=startI;i<pairs.length;i++)
				{
					var pair = pairs[i].split('=');	
					if 	(pair[0] != 'default')
					{
						if (param == '')
						{
							document.all["showCity"].style.display = 'none';
							return  'Edmonton_AB';
						}
						else
						{
							document.all["searchForCity"].style.display = 'none';
							return param;
						}												
					}
					else
					{	
						var pair2= pairs[i+1].split('=');							
						if (pair2[0] == 'wcity' && pair2[1] != '')						
						{											
							document.all["searchForCity"].style.display = 'none';
							return pair2[1];
						}	
						else
						{													
							document.all["showCity"].style.display = 'none';
							return  'Edmonton_AB';
						}				
					}		
				}
		}	
		else
		{

				document.getElementById("showCity").style.display = '';
				document.getElementById("searchForCity").style.display = '';
				
				var pairs=unescape(location.search.substring(1).replace(/\+/g," ")).split('&');
				var startI = 1;
				if (pairs[0].substring(0,7) == '')
				{
					startI = 0;
				}
				
				for (var i=startI;i<pairs.length;i++)
				{
					var pair = pairs[i].split('=');	
					if 	(pair[0] != 'default')
					{
						if (param == '')
						{
							document.getElementById('showCity').style.display = 'none'; 
							return  'Edmonton_AB';
						}
						else
						{
							document.getElementById('searchForCity').style.display = 'none'; 
							return param;
						}												
					}
					else
					{	
						var pair2= pairs[i+1].split('=');							
						if (pair2[0] == 'wcity' && pair2[1] != '')						
						{											
							document.getElementById('searchForCity').style.display = 'none'; 
							return pair2[1];
						}	
						else
						{													
							document.getElementById('showCity').style.display = 'none'; 
							return  'Edmonton_AB';
						}				
					}		
				}
		}									
}	
			