function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindow2(theURL,winName) { //v3.0
	MM_openBrWindow(theURL,winName,'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

var url;
if ( document.location.href.indexOf(":") > 4 ){
 //production
 url = 'https://www.ky.com/';
}else{
 //staging
 url = 'http://148.177.2.20:7171/';
}


function ssiFormContactUs() 
{
	var address = window.location.href;
	address = address.substring(7);
	if (address.indexOf(':') == -1 ) 
	{
		javascript:window.location.href='https://www.ky.com/contact_us.jsp';
	} 
	else 
	{
	javascript:window.location.href='THE-PAGE.jsp';
	}
	return true;
}

function ssiFormSampleBuffer() 
{
	var address = window.location.href;
	address = address.substring(7);
	if (address.indexOf(':') == -1 ) 
	{
		javascript:window.location.href='https://www.ky.com/sample_form.jsp';
	} 
	else 
	{
	javascript:window.location.href='THE-PAGE.jsp';
	}
	return true;
}

function country() { 
	if (navigator.userAgent.indexOf("Opera")!=-1) 
		(language=navigator.language) 
	else { 
		if (navigator.appName == "Netscape") 
			(language=navigator.language) 
	else language=navigator.browserLanguage }; 
	
	if (language){
		language=language.substring(0,2)
	} 
	else {
		language="zz"
	} 
}

function Privacy() {
	window.open('/privacy','_blank','width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=No,fullscreen=No');	
}

function Legal() {
	window.open('/legal','_blank','width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=No,fullscreen=No');	
}

country();
