
function setPointer(theRow, over)
{
    if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
        return false;
    }
    thePointerColor = '#C8E4FF';
    if (over)
	thePointerColor = '#80FF80';
    var row_cells_cnt = theRow.cells.length;
    for (var c = 0; c < row_cells_cnt; c++) {
        theRow.cells[c].bgColor = thePointerColor;
    }

    return true;
}

function newWindow(file, width, height, fullscreen)
{
	var left = 0;
	var top = 0;
	str = "";
	if (!fullscreen)
	{
		str = ("left=" + left + ",");
		str += ("top=" + top + ",");
		str += ("width=" + width + ",");
		str += ("height=" + height + ",");
	}
		str += "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,history=0,resizable=0";
	if (fullscreen)
		str += ",fullscreen";
	win2=this.open(file, 'somename', str);

	if ((document.layers || document.all) && !fullscreen)
	{	
		win2.resizeTo(width,height);
		win2.moveTo(left,top);
	}
	win2.focus();
}

function checkFrames() {
//	if ((parent.location == this.location) || (this.name != "smeenkmain"))
//		parent.location = "http://www.smeenk.com/index.php?fromname="+this.location;
}

// Retrieve cookie value from cookie string
// Remove special escape characters from cookie
function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

// Retrieve cookie value from client
// Search name in cookie string
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;
}

// Set cookie name value pair
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;  
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}

// Delete cookie by setting immediate expiration
function DeleteCookie (name) {  
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}




