function NewPopup(syear,smonth,sday,shour,smin,eyear,emonth,eday,ehour,emin,cookiename,szurl,nwidth,nheight)
{
	TheDate = new Date();                     
	Month = TheDate.getMonth()+1;              
	Day = TheDate.getDate();                 
	Year = TheDate.getYear();
	if (Year< 1000)
		Year+=1900;
	Hour = TheDate.getHours();
	Minute = TheDate.getMinutes();
	Second = TheDate.getSeconds();
	
	Sdate = Date.UTC(syear,smonth,sday,shour,smin,"00");
	
	//alert (Year+":"+Month+":"+Day+":"+Hour+":"+Minute+":"+Second);
	Cdate = Date.UTC(Year,Month,Day,Hour,Minute,Second);
	
	//alert (eyear+":"+emonth+":"+eday+":"+ehour+":"+emin)
	Edate = Date.UTC(eyear,emonth,eday,ehour,emin,"00");
	
	TimeGap1 = Sdate-Cdate
	TimeGap2 = Edate-Cdate
	//alert (Cdate +"\n"+ Edate +"\n"+ TimeGap);

	if ( (TimeGap1 < 0 ) && ( TimeGap2 > 0 ) )
	{
		//alert(cookiename);
		if(getCookie2(cookiename)!="Y")
		{
			window.open(szurl,'popup','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width='+nwidth+',height='+nheight); 
		}
	}
}

function getCookie2(name) {
	var Found = false;
	var start, end;
	var i = 0;

	while(i <= document.cookie.length) {
		start = i;
		end = start + name.length;
		if(document.cookie.substring(start,end) == name) {
			Found = true;
			break;
		}
		i++;
	}

	if (Found == true) {
		start = end + 1;
		end = document.cookie.indexOf(";", start);

		if(end < start) {
			end = document.cookie.length;
		}

		return document.cookie.substring(start, end);
	}

	return "";
}
