<!-- 
	// Get the HTTP Object
	var httpObject = null; 
	var httpWeather = null;
	var WK_region;
	var t;
	var s;

	function getHTTPObject(){   
		if  (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		}  
		else if (window.ActiveXObject) {
			return new ActiveXObject("MSXML2.XMLHTTP.3.0");
	
		}   
		else 
		{      
			/*alert("Your browser does not support AJAX.");*/      
			return null;   
		}
	}    
	
	
	// probably won't need this!
	function getWeatherObject(){   
		if  (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		}  
		else if (window.ActiveXObject) {
			return new ActiveXObject("MSXML2.XMLHTTP.3.0");
	
		}   
		else 
		{      
			/*alert("Your browser does not support AJAX.");*/      
			return null;   
		}
	}    
		
	
	// Change the value of the outputText field
	
	function setOutput(){
		if(httpObject.readyState == 4)
		{
			var WK_response;
			
			WK_response = httpObject.responseText;
			
			WK_recent_posts = document.getElementById('recent-posts');
			
			if(WK_recent_posts){
				if(WK_response.indexOf('The server encountered') == -1 )
				{
					WK_recent_posts.innerHTML = WK_response;	
				} 
			} 
			else {
				//alert('Didnt get object')
			}
			
			
	    } 
	} 
	
	function setWeather(){
		WK_Weather = document.getElementById('wxButtonFrame');
		if(WK_Weather){
			WK_Weather.src = WK_Weather.src; 
		} 
		else {
			//alert('Didnt get weather object')
		}
		s = setTimeout('setWeather()', 180000);
		
	} 
	
	
	function getStarted(region_in){        
		WK_region=region_in;
		getRecentPosts();
		s = setTimeout('setWeather()', 180000);
	} 
	
	
	function getRecentPosts()
	{
	
		httpObject = getHTTPObject();    
	
		if (httpObject != null) 
		{
			var randomnumber=Math.floor(Math.random()*50000);
			/* need to do the random number or else IE caches for one minute*/
			httpObject.open("GET", "/GetRecent.php?region=" + WK_region + "&mode=text&id=" + randomnumber, true);
			httpObject.send(null);
			httpObject.onreadystatechange = setOutput;
	  	}	
		
		t = setTimeout('getRecentPosts()', 20000);
		
	}
	
	
	
	
	function WK_popup(mylink, windowname, width, height)
	{
	if (! window.focus)return true;
	
	if (typeof width == 'undefined') width = '620';
	if (typeof height == 'undefined') height = '660';
	
	var mywin, href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	mywin = window.open(href, windowname, 'width=' + width + ',height=' + height + ',scrollbars=1');
	mywin.focus();
	return false;
	}
	
	
	function submitForm(formName)
	{
		if (document.forms[formName].onsubmit())
		{
			document.forms[formName].submit();
		}
	}
	
	function openPopup()
	{

		window.open('','_popup','toolbars=0,location=0,width=370,height=450');
		return true;

	}
	
	function closeMe()
	{
		window.opener = top;//to avoid confirmation message default by windows
		window.close();

	}

	
	function WK_sethome(region)
	{
	    if (document.all)
	    {
	    	document.body.style.behavior='url(#default#homepage)';
	    	document.body.setHomePage('http://' + region + '.wannaknow.ca');
	
	    }
	    else if (window.sidebar)
	    {
	    	if(window.netscape)
	        {
	        	try
	          	{
	          		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
	          	}
	       		catch(e)
	      		{
	    			alert("Unable to set homepage because of your security settings.  Please set it up manually...");
				}	
			}
			var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage','http://' + region + '.wannaknow.ca');
		}
	}
	
	function qsearch_onSubmit()
	{
		qs_enginename = document.getElementById('qsearch_select').value;
		qs_keywords = document.getElementById('searchfield').value;
		switch( qs_enginename )
		{
		case 'site':
			break;
		case 'author':
			window.open('search.php?author=' + qs_keywords, '_self', '');
			return false;
		case 'wikipedia':
			window.open('http://en.wikipedia.org/wiki/Spezial:Search?search=' + qs_keywords, '_wikipedia', '');
			return false;
		case 'google':
			window.open('http://www.google.com/search?q=' + qs_keywords, '_google', '');
			return false;
		case 'yahoo':
			window.open('http://search.yahoo.com/search?p=' + qs_keywords, '_yahoo', '');
			return false;	
		case 'msnlive':
			window.open('http://search.live.com/results.aspx?q=' + qs_keywords, '_msnlive', '');
			return false;
		case 'altavista':
			window.open('http://www.altavista.com/web/results?itag=ody&q=' + qs_keywords + '&kgs=0&kls=0', '_altavista', '');
			return false;
		case 'lycos':
			window.open('http://search.lycos.com/?query=' + qs_keywords, '_lycos', '');
			return false;
		case 'odp':
			window.open('http://search.dmoz.org/cgi-bin/search?search=' + qs_keywords, '_odp', '');
			return false;
		default:
			if( (i = qsearch_findEngine(qs_enginename)) >= 0 )
			{
				window.open(qsearch_engines[i].url + qs_keywords, '_blank', '');
				return false;
			}
			break;
		}
		return true;
	}
	// for the tooltip test
	function xstooltip_findPosX(obj) 
	{
	  var curleft = 0;
	  if (obj.offsetParent) 
	  {
	    while (obj.offsetParent) 
	        {
	            curleft += obj.offsetLeft
	            obj = obj.offsetParent;
	        }
	    }
	    else if (obj.x)
	        curleft += obj.x;
	    return curleft;
	}
	
	function xstooltip_findPosY(obj) 
	{
	    var curtop = 0;
	    if (obj.offsetParent) 
	    {
	        while (obj.offsetParent) 
	        {
	            curtop += obj.offsetTop
	            obj = obj.offsetParent;
	        }
	    }
	    else if (obj.y)
	        curtop += obj.y;
	    return curtop;
	}
	
	function xstooltip_show(tooltipId, parentId, posX, posY)
	{
	    it = document.getElementById(tooltipId);
   		/*last_panel = tooltipId;*/
	    
	    if ((it.style.top == '' || it.style.top == 0) 
	        && (it.style.left == '' || it.style.left == 0))
	    {
	        // need to fixate default size (MSIE problem)
	        it.style.width = it.offsetWidth + 'px';
	        it.style.height = it.offsetHeight + 'px';
	        
	        img = document.getElementById(parentId); 
	    
	        // if tooltip is too wide, shift left to be within parent 
	        /*if (posX + it.offsetWidth > img.offsetWidth) posX = img.offsetWidth - it.offsetWidth;*/
	        /*if (posX < 0 ) posX = 0;*/ 
	        
	        x = xstooltip_findPosX(img) + posX;
	        y = xstooltip_findPosY(img) + posY;
	        
	        it.style.top = y + 'px';
	        it.style.left = x + 'px';
	    }
	    
	    it.style.visibility = 'visible'; 
	}
	
	function xstooltip_hide(id)
	{
		it = document.getElementById(id); 
    	it.style.visibility = 'hidden';
	}

	
/*	var cancel_hide = ''; 
	var last_panel ='';  
	function xstooltip_cancel_hide(id)
	{
	    cancel_hide = id; 
	}
	
	function WK_tooltip_hide(id){        
 
		s = setTimeout(xstooltip_hide, 1000, last_panel);
	} 
	
	function WK_tooltip_force_hide(id)
	{
	    cancel_hide = '';
		it = document.getElementById(id); 
    	it.style.visibility = 'hidden';
	}
	

	function xstooltip_hide(id)
	{
	    if (id == undefined)
	    {
	    	id = last_panel;
	    }
		if (id != cancel_hide)
		{
			it = document.getElementById(id); 
	    	it.style.visibility = 'hidden';
		} 
	}
*/
//-->
