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 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=274,height=438')

	}

<!-- 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 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 chkaddqty()

	{

		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 checkinqForm()

	{

		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 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 checkdelForm()

	{

		if (checkempty(document.frmfeed.fname,"Information - Enter Name")==false) return false;
		if (checkempty(document.frmfeed.bname,"Information - Your Bussiness Name")==false) return false;
		if (checkempty(document.frmfeed.bph,"Information - Enter Your Bussiness Phone")==false) return false;
		if (test(document.frmfeed.email,"Information - Email Address Is Required")==false) return false;

		return true;

	}
	function chksubscribe()

	{

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

		return true;

	}
	////////////////////////////// menu start ////////////////////////////////////////////////////////////////////////////
var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)

var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only



if (document.getElementById){ //DynamicDrive.com change

document.write('<style type="text/css">\n')

document.write('.submenu{display: none;}\n')

document.write('</style>\n')

}



function SwitchMenu(obj){

	if(document.getElementById){

	var el = document.getElementById(obj);

	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change

		if(el.style.display != "block"){ //DynamicDrive.com change

//			for (var i=0; i<ar.length; i++){

			for (var i=0; i<ar.length; i++){

				if (ar[i].className=="submenu") //DynamicDrive.com change

				ar[i].style.display = "none";

			}

			el.style.display = "block";

		}else{

			el.style.display = "none";

		}

	}

}



function get_cookie(Name) { 

var search = Name + "="

var returnvalue = "";

if (document.cookie.length > 0) {

offset = document.cookie.indexOf(search)

if (offset != -1) { 

offset += search.length

end = document.cookie.indexOf(";", offset);

if (end == -1) end = document.cookie.length;

returnvalue=unescape(document.cookie.substring(offset, end))

}

}

return returnvalue;

}



function onloadfunction(){

if (persistmenu=="yes"){

var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname

var cookievalue=get_cookie(cookiename)

if (cookievalue!="")

document.getElementById(cookievalue).style.display="block"

}

}



function savemenustate(){

var inc=1, blockid=""

while (document.getElementById("sub"+inc)){

if (document.getElementById("sub"+inc).style.display=="block"){

blockid="sub"+inc

break

}

inc++

}

var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname

var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid

document.cookie=cookiename+"="+cookievalue

}



if (window.addEventListener)

window.addEventListener("load", onloadfunction, false)

else if (window.attachEvent)

window.attachEvent("onload", onloadfunction)

else if (document.getElementById)

window.onload=onloadfunction



if (persistmenu=="yes" && document.getElementById)

window.onunload=savemenustate
///////////////////////// menu end /////////////////////////////////////
