function func1(x)
{
	if(x == "/sponsor/info")
	{
		location = x;
	}
	else
	{
		window.open(x, 'popupwindow', 'width=700,height=400,left=5,top=5,menubar'); 
	}
	
	return false;
}
		
function func2(me, x)
{
	var e1_obj = document.getElementById(me);
	
	if(e1_obj) 
	{
		e1_obj.style.borderLeft = x? "1px solid #ffffff": "";
		e1_obj.style.borderRight = x? "1px solid #ffffff": "";
	}
}

function set_limit(a, b)
{ 	
	document.limit1 = a;
	document.min1 = b;
	
 	if(document.getElementById && 
 		navigator.appVersion.indexOf("MSIE") > -1 && 
 		!window.opera)
 	{
 		if(window.attachEvent)
 		{
 			window.attachEvent("onresize", set_min_width);
 			window.attachEvent("onload", set_min_width);
 		}
 		else
 		{
 			onload=set_min_width;
 			onresize=set_min_width;
 		}
 	}
}

function set_min_width()
{ 	
	var cw,w,pl,pr,ml,mr,br,bl,ad,which=document.limit1;
	var g=document.getElementById(which);
	
	w=parseInt(document.min1);
	
	if(g && document.body && document.body.clientWidth)
	{
		gs=g.currentStyle;
		cw=parseInt(document.body.clientWidth);
		pl=parseInt(gs.paddingLeft);
		pr=parseInt(gs.paddingRight);
		ml=parseInt(gs.marginLeft);
		mr=parseInt(gs.marginRight);
		bl=parseInt(gs.borderLeftWidth);
		br=parseInt(gs.borderRightWidth);
		ml=ml?ml:0;
		mr=mr?mr:0;pl=pl?pl:0;pr=pr?pr:0;bl=bl?bl:0;br=br?br:0;
		ad=pl+pr+ml+mr+bl+br;
 		if(cw<=w)
 		{
	 		w-=ad;g.style.width=w+"px";
	 	}
	 	else
	 	{	
		 	g.style.width="auto";
		}
 	}
}
		
function cal1(day, month, year)
{
	var x = "/cgi-bin/griff/cal1.cgi?day=" + day + "&month=" + month + "&year=" + year;
	window.open(x, 'popupwindow', 'width=700,height=400,left=5,top=5,menubar'); 
}



