function loader() { if(screen.height==768) 
{ document.getElementById("kk").style.display=""; } else { if(screen.height==600) { document.getElementById("kk").style.display="none"; } } }

function load_bottom() { if(screen.height==768) 
{ document.getElementById("kk_bottom").style.display=""; } else { if(screen.height==600) { document.getElementById("kk_bottom").style.display="none"; } } }


function OpenSignUpWindow() {
	newWindow = window.open('signup.htm','signupWindow',"resizable, width=300,height=320, left=0, top=0, screenX=0, screenY=0");
	newWindow.focus();
}

function OpenContactUsWindow() {
	newWindow = window.open('contactus.htm','contactUsWindow',"resizable, width=350,height=542, left=0, top=0, screenX=0, screenY=0");
	newWindow.focus();
}

function OpenOrderForExcelSheet() {
	//var location = 'http://localhost/tp';
	//var location = 'http://www.ournewsletter.co.uk/staging/tp';
	var location = '';
	newWindow = window.open(location + 'files/Order-Quote-Form.xls','orderform',"resizable, left=0, top=0, screenX=0, screenY=0");
	newWindow.focus();
}

function OpenFaqAnswerWindow(faqID,windowWidth,windowHeight,isScrollbars) {
//	newWindow = window.open('FaqAnswer'+faqID + '.htm','faqwindow',"resizable, width=360, height=255, left=0, top=0, screenX=0, screenY=0,scrollbars");
	var scrollbars = '';
/*	if (isScrollbars == true)
	{
		scrollbars = ', scrollbars=yes'
	}*/
	//newWindow = window.open('FaqAnswer'+faqID + '.htm','faqwindow',"resizable, width=" + windowWidth + ", height=" + windowHeight + ",  left=0, top=0, screenX=0, screenY=0" + scrollbars);
	newWindow = window.open('FaqAnswer'+faqID + '.htm','FaqAnswer'+faqID ,"resizable, width=" + windowWidth + ", height=" + windowHeight + ",  left=0, top=0, screenX=0, screenY=0" + scrollbars);

	newWindow.focus();
}

function CheckEmail(msg,ctr)
{ // funcion to check valid email

var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
var regex = new RegExp(emailReg);
var sError = ""
var write_
if (ctr.value.length == 0)
{
write_ = msg + " can't be Blank"
	alert(write_)
	ctr.focus()
	return true   
}
else
{
	if (ctr.value != "" && regex.test(ctr.value) == false)
	{ 
	write_ = msg + " requires a valid value"
	alert(write_)
	ctr.focus()
	return true       
	}
	return false;
}
}

function check_empty(form_element,text_message)
{  // function that checks whether a form_elemnt is empty or not
	
		if (form_element.value == "")
		{
			alert(text_message + " cannot be left empty");
			form_element.focus();
			return true;
		}
		
	return false;		
}
