function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}


function closeWin(obj) 
{ 
	//if ( document.forms[0].elements["chkbox"].checked ) 
	setCookie(obj, "done" , 1); 
	self.close(); 
}


function openMainPopup(obj,url,width,height,scroll,left,top)
{
	if (getCookie(obj) != "done")
	{
		evt1 = window.open(url, "_"+obj, "width="+width+", height="+height+", scrollbars="+scroll+", left="+left+"; top="+top);
		evt1.focus();
	}
}

function openConstruct()
{
/*
	var cont = window.open("/popup/construct.htm", "_cont", "width=350, height=450, scrollbars=no, left=50; top=50");
	cont.focus();
*/	
}

function openNotice(obj)
{
	if ( getCookie( obj ) != "done" )
	{
		var not = window.open("/popup/Notice.htm", "_not", "width=350, height=243, scrollbars=no, left=460; top=50");
		not.focus();
	}
}

function GoGo(url)
{
	opener.document.location.href=url;
	
	self.close();
}