/* ----------------------------------------------------
	open new window with cookie warning
------------------------------------------------------ */
function nikeGeneralCookieNotice() {
	nikeGeneralNoticeWindow("/usa/cookie/cookies_main.jhtml", 600, 400, "winCookie");
}

/* ----------------------------------------------------
	open new window with privacy notice
------------------------------------------------------ */
function nikeGeneralPrivacyNotice() {
	nikeGeneralNoticeWindow("/usa/cookie/privacy_main.jhtml", 600, 400, "winPrivacy");
}

/* ----------------------------------------------------
	open new window
------------------------------------------------------ */
function nikeGeneralNoticeWindow(filePath,width,height,windowName) {

	var win_x = (screen.width - width)/2;
	var win_y = (screen.height - height)/2;

	var features = 'toolbar=no,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height+',screenX='+win_x+',screenY='+win_y+',top='+win_y+',left='+win_x;

	windowName = window.open(filePath, windowName, features);
	windowName.focus() ;

}

/* ----------------------------------------------------
	check if cookies are enabled and return true/false
------------------------------------------------------ */
function nikeGeneralCookiesEnabled(){ 
	document.cookie = "temp=test";
	readCookie = -1; 
	if(document.cookie.length > 0){
		readCookie = document.cookie.indexOf("temp=");
	}
	if (readCookie == -1){
		//got no cookies;
		return false;
	} else {
		//got cookies;
		document.cookie = "temp=test; expires=Thu, 01-Jan-70 00:00:01 GMT";
		return true;
	}
}

