if (top.location != document.location.href) { 
	top.location = document.location.href;
} 

function formHandler(form){
	var URL = document.form.site.options[document.form.site.selectedIndex].value;
	window.location.href = URL;
}

function openForumWin(url,name) {
	var initstr = "scrollbars=yes,resizable=yes,status=no,toolbar=yes,width=640,height=480";
	open(url,name,initstr);
}

function openChat(url,name) {
	var initstr = "statusbar=no,toolbars=no,width=640,height=480";
	open(url,name,initstr);
}

function openSmallWin(url,name) {
	var initstr = "statusbar=no,toolbars=no,width=500,height=350";
	open(url,name,initstr);
}

function getCookieVal (offset) {  
var endstr = document.cookie.indexOf (";", offset);  
if (endstr == -1)    
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));
}

function getCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}

function setCookie (name, value) {  
var argv = setCookie.arguments;  
var argc = setCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  

var not_NN2 = (navigator && navigator.appName 
		       && (navigator.appName == 'Netscape') 
		       && navigator.appVersion 
		       && (parseInt(navigator.appVersion) == 2))?false:true;

if(expires && not_NN2) {
	if ( (typeof(expires) == 'string') && Date.parse(expires) ) {
		var numHours = expires;
	} else if (typeof(expires) == 'number') {
		var numHours = (new Date((new Date()).getTime() + expires*3600000)).toGMTString();
	}
}

document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + numHours)) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}

function deleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = getCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}