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 getCookietest( name )
{
	var nameOfCookie = name + "=";
	
	var x = 0;

//	alert(nameOfCookie)

	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 open_windowtest(theURL,winName,features) {
	
	var blnCookie = getCookietest("c4tourPopup");


	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}


function open_windowtest1(theURL,winName,features) {
	
	var blnCookie = getCookietest("c4tourPopup1");


	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function open_window(theURL,winName,features) {
	
	var blnCookie = getCookie("c4tourPopup");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function open_windowpk(theURL,winName,features) {
	
	var blnCookie = getCookie("pkPopup");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function getCookie2( 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 open_window2(theURL,winName,features) {
	
	var blnCookie = getCookie("Notice");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function open_gana1(theURL,winName,features) {
	
	var blnCookie = getCookie("gana_op1");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function open_gana2(theURL,winName,features) {
	
	var blnCookie = getCookie("gana_op2");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}

function open_gana3(theURL,winName,features) {
	
	var blnCookie = getCookie("gana_op3");
	
	if ( !blnCookie )
	{
	   window.open(theURL,winName,features);
	   //alert(blnCookie);
	}
}