//////////////////////////////////////     
var xmlHttp
function showPg(ctlName,page){
	var xmlHttp = GetXmlHttpObject();
	var url = page+"&sid="+Math.random();
	if (!xmlHttp){
		alert ("Browser does not support HTTP Request")
		return
	}
	xmlHttp.onreadystatechange=function(){
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
			document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
		}
	};
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}
function GetXmlHttpObject(){ 
var objXMLHttp=null;
     if (window.XMLHttpRequest){
          objXMLHttp=new XMLHttpRequest();
     }else if (window.ActiveXObject){
          objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
     return objXMLHttp;
}
/////////////////////
function openWin(pagename){

		microsite_window=window.open(pagename,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=no,menubar=no,scrollbars=no,top=0,left=0,resizable=no,width=10,height=10')

	}

	function openWin1(pagename){

		microsite_window=window.open(pagename,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=no,menubar=no,scrollbars=no,top=0,left=0,resizable=no,width=600,height=400')

	}

	function openWin2(pagename){

		microsite_window=window.open(pagename,'microsite_window','toolbar=no,location=no,borders=no,directories=no,status=no,menubar=no,scrollbars=no,top=0,left=0,resizable=no,width=310,height=210')

	}

<!-- Begin

var win = null;

function newWindow(mypage,myname,w,h,features) {

  var winl = (screen.width-w)/2;

  var wint = (screen.height-h)/2;

  if (winl < 0) winl = 0;

  if (wint < 0) wint = 0;

  var settings = 'height=' + h + ',';

  settings += 'width=' + w + ',';

  settings += 'top=' + wint + ',';

  settings += 'left=' + winl + ',';

  settings += features;

  win = window.open(mypage,myname,settings);

  win.window.focus();

}

//  End -->

//javascript:newWindow('downloads.asp','','600','420')

	function test(obj,msg) {

		  var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;

		  if (regex.test(obj.value))

		  {

			return true;

		  }

		  else{

			alert(msg);

			obj.focus();

			return false;

		  }

		}



	function checkempty(obj,msg)

	{

	 if(obj.value=="")

	 {

	  alert(msg);

	  obj.focus();

	  return false;

	 }

	}

	function checkint(obj,msg)

	{

	 if(isNaN(obj.value))

	 {

	  alert(msg);

	  obj.focus();

	  return false;

	 }

	}

function confirmPassword(obj,obj1,msg)

{

 if(!(obj.value==obj1.value))

 {

  alert(msg);

  obj.focus();

  return false;

 }

}

function isnumber(obj,msg)

{

 if(isNaN(obj.value))

 {

  alert(msg);

  obj.focus();

  return false;

 }

}

	function checksForm()

	{

		if (checkempty(document.frmsearch.txtsearch,"Search Information - Enter Search words")==false) return false;

		return true;

	}

	function checkfForm()

	{

		if (checkempty(document.frmfeed.name,"Contact Information - Enter Name")==false) return false;

		if (test(document.frmfeed.email,"Contact Information - Email Address Is Required")==false) return false;

//		if (checkempty(document.frmfeed.comments,"Contact Information - Enter Comments")==false) return false;

		return true;

	}

	function chkqty()

	{

		if (checkempty(document.frmadd.qty,"Information - Enter Quantity")==false) return false;

		return true;

	}

	function checkicForm()

	{

		if (checkempty(document.frmCon.fname,":::...Enter Your Full Name...:::")==false) return false;

		if (checkempty(document.frmCon.company,":::...Enter Your Company Name...:::")==false) return false;

		if (test(document.frmCon.email,":::...Email Address Is Required...:::")==false) return false;

		return true;

	}

	function checkForm()

	{

		if (checkempty(document.frmcatalogue.name,"Catalogue Information - Enter Your Name")==false) return false;

		if (checkempty(document.frmcatalogue.company,"Catalogue Information - Enter Your Compnay Name")==false) return false;

		if (checkempty(document.frmcatalogue.phone,"Catalogue Information - Enter Your Phone")==false) return false;

		if (test(document.frmcatalogue.email,"Catalogue Information - Email Address Is Required")==false) return false;

		if (checkempty(document.frmcatalogue.mailing,"Catalogue Information - Enter Your Mailing Address")==false) return false;

		return true;

	}

	function checkfeedForm()

	{

		if (checkempty(document.frmfeed.name,"Contact Information - Enter Name")==false) return false;

		if (test(document.frmfeed.email,"Contact Information - Email Address Is Required")==false) return false;

		if (checkempty(document.frmfeed.comments,"Contact Information - Enter Comments")==false) return false;

		return true;

	}

	function checkinqForm()

	{

		if (checkempty(document.form1.txtname,"Inquiry Information - Enter Contact Person Name")==false) return false;

		if (checkempty(document.form1.txtcompany,"Inquiry Information - Enter Company Name")==false) return false;		

		if (checkempty(document.form1.txttel,"Inquiry Information - Enter Your Phone No.")==false) return false;

		if (checkempty(document.form1.txtfax,"Inquiry Information - Enter Your Fax No.")==false) return false;

		if (test(document.form1.txtemail,"Inquiry Information - Email Address Is Required")==false) return false;

		if (checkempty(document.form1.txtaddress,"Inquiry Information - Enter Your Address")==false) return false;

		return true;

	}

	function checkinqForm1()

	{

		if (checkempty(document.form1.fname,"Inquiry Information - Enter Contact Person Name")==false) return false;

		if (checkempty(document.form1.company,"Inquiry Information - Enter Company Name")==false) return false;		

		if (checkempty(document.form1.ph,"Inquiry Information - Enter Your Phone No.")==false) return false;

		if (checkempty(document.form1.fax,"Inquiry Information - Enter Your Fax No.")==false) return false;

		if (test(document.form1.email,"Inquiry Information - Email Address Is Required")==false) return false;

		if (checkempty(document.form1.address,"Inquiry Information - Enter Your Address")==false) return false;

		return true;

	}

	function chksubscribe()

	{

		if (test(document.frmsubscribe.txtsubscribe,"Email Subscribe! - id@domainname.com")==false) return false;

		return true;

	}
function chkTAF(){
	if (checkempty(document.frmTAF.yourname,"Tell A Friend! - Enter Your Name")==false) return false;
	if (test(document.frmTAF.youremail,"Tell A Friend! - Enter Your Valid Email Address")==false) return false;
	if (checkempty(document.frmTAF.friendname,"Tell A Friend! - Enter Your Friend Name")==false) return false;
	if (test(document.frmTAF.friendemail,"Tell A Friend! - Enter Your Friend's Valid Email Address")==false) return false;
	return true;
}
function checkpInqForm(){
	if (checkempty(document.frmfeed.fname,"Contact Information - Enter Full Name")==false) return false;
	if (test(document.frmfeed.email,"Contact Information - Email Address Is Required")==false) return false;
	if (checkempty(document.frmfeed.comments,"Contact Information - Enter Comments")==false) return false;
	return true;
}