function NewWindow(mypage, myname, w, h, scroll){
	var winl = (screen.width - w) - 20;
	var wint = 0;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4){ 
	win.window.focus(); 
	}
}

function NewWindow2(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { 
	win.window.focus(); 
	}
}

var ckTemp = document.cookie;

function setCookie(name, value) { 
	if (value != null && value != "")
  document.cookie=name + "=" + escape(value) + ";";
 	ckTemp = document.cookie;
}
  
function getCookie(name) { 
 	var index = ckTemp.indexOf(name + "=");
 	if(index == -1) return null;
  	index = ckTemp.indexOf("=", index) + 1;
 	var endstr = ckTemp.indexOf(";", index);
 	if (endstr == -1) endstr = ckTemp.length;
 	return unescape(ckTemp.substring(index, endstr));
}

function checkCount() {
// 	var temp = getCookie("popup");
// 	if(!temp==1) {
//  setCookie("popup",1);
//  NewWindow('/promotion.php','size','300','310','no');
//  }
}

function autoDrop(){
	var URL = document.dropForm.dropDown.options[document.dropForm.dropDown.selectedIndex].value;
	window.location.href = URL;
}





