function fnmenu(page)
{
	var page;
	var str="";
	var spacert="";
	var spacelt="";
	spacert = "<span class='menu-spacing'>&nbsp; | &nbsp;</span>";
	
	if (page=='install')
		{	
		
			str+= "<a href='alarm_install.html' class='menulink' id='active' onMouseOver='hideall(),menu(0);'>Alarms</a>"+spacert;
		}
		else
		{
			str+="<a href='alarm_install.html' class='menulink' onMouseOver='hideall(),menu(0);'>Alarms</a>"+spacert;
			
		}
		
			if (page=='access')
		{	
			str+="<a href='access_control.html' class='menulink' id='active' onMouseOver='hideall();'>Access Control</a>"+spacert;
		}
		else
		{	
			
			str+="<a href='access_control.html' class='menulink' onMouseOver='hideall();'>Access Control</a>"+spacert;
			
		}
	if (page=='cctv')
		{	
			str+="<a href='cctv.html' class='menulink' id='active' onMouseOver='hideall();'>CCTV</a>"+spacert;
		}
		else
		{
			
			
			str+="<a href='cctv.html' class='menulink' onMouseOver='hideall();'>CCTV</a>"+spacert;
			
		}


	if (page=='intercoms')
		{	
			str+="<a href='intercoms.html' class='menulink' id='active' onMouseOver='hideall();'>Intercoms</a>"+spacert;
		}
		else
		{
			
			str+="<a href='intercoms.html' class='menulink' onMouseOver='hideall();'>Intercoms</a>"+spacert;
			
		}
		
		if (page=='guards')
		{	
			str+="<a href='guards_patrols.html' class='menulink' id='active' onMouseOver='hideall();'>Guards & Patrols</a>"+spacert;
		}
		else
		{
			
			str+="<a href='guards_patrols.html' class='menulink' onMouseOver='hideall();'>Guards & Patrols</a>"+spacert;
			
		}
		
		if (page=='locksmith')
		{	
			str+="<a href='locksmith.html' class='menulink' id='active' onMouseOver='hideall();'>Locksmith</a>"+spacert;
		}
		else
		{
			
			str+="<a href='locksmith.html' class='menulink' onMouseOver='hideall();'>Locksmith</a>"+spacert;
		
		}
		
		if (page=='security')
		{	
			str+="<a href='security_consulting.html' class='menulink' id='active' onMouseOver='hideall(),menu(1);'>Security</a>";
		}
		else
		{
			
			str+="<a href='security_consulting.html' class='menulink'  onMouseOver='hideall(),menu(1);'>Security</a>";
		}

	document.write(str);
}

function fnbottom()
{
	var str=""		
		str+="<div style='margin-top:5px; width:710px; position:static; float:left;'><a href='index.html' class='btmlink'>Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='our_experience.html' class='btmlink'>Our Experience</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='alarm_install.html' class='btmlink'>Alarm Installation</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='alarm_monitor.html' class='btmlink'>Alaram Monitoring</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='guards_patrols.html' class='btmlink'>Guards & Patrols</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='locksmith.html' class='btmlink'>Locksmith</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='access_control.html' class='btmlink'>Access Control</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='links.html' class='btmlink'>Links</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
		str+="<a href='aboutUs.html' class='btmlink'>About Us</a>";
		str+="<br /><font class='copy'>&copy; 2008 Yates Security Group.&nbsp;&nbsp;All Rights Reserved</font></div>";
	document.write(str);
}


/*function fnservices()
{
		resizeimg();
		var str="";
		str+="<table cellpadding='0' cellspacing='0' boroder='0'>";
		str+="<img src='images/services.gif' border='0' title='Services' style='margin:5px 0 5px 10px;' />";
		str+="<ul class='inservice'>";
		str+="<li><a href='alarm_install.html' class='servicelink'>Alarm installation</a></li>";
		str+="<li><a href='alarm_monitor.html' class='servicelink'>Alarm monitoring 24 hours</a></li>";
		str+="<li><a href='rapid_alarm.html' class='servicelink1'>Rapid alarm response service</a></li>";
		str+="<li><a href='access_control.html' class='servicelink1'>Access control systems</a></li>";
		str+="<li><a href='cctv.html' class='servicelink1'>CCTV</a></li>";
		str+="<li><a href='intercoms.html' class='servicelink1'>Intercoms</a></li>";
		str+="<li><a href='guards_patrols.html' class='servicelink1'>Guards and patrols</a></li>";
		str+="<li><a href='locksmith.html' class='servicelink1'>Locksmith</a></li>";
		str+="<li><a href='security_consulting.html' class='servicelink1'>Security consulting </a></li>";
		str+="</ul>";
		str+="</table>";
	document.write(str);
}
*/
function resizeimg(){
	var swf_x = 0;
	swf_x = document.body.clientWidth;
	eval(document.getElementById("container")).style.backgroundPosition = ((swf_x-710)/2)+"px";
	eval(document.getElementById("contentTable")).style.left = ((swf_x-710)/2)+"px";
		//alert(document.body.clientWidth);
}

window.onload=function(){
	//resizeimg();
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function GetCountry(defaultValue,isNotWithSelect)
{
	var sCountry="Afghanistan,Albania,Algeria,American Samoa,Andorra,Angola,Anguilla,Antarctica,Antigua and Barbuda,Argentina,Armenia,Aruba,Australia,Austria,Azerbaidjan,Bahamas,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bermuda,Bolivia,Bosnia-Herzegovina,Botswana,Bouvet Island,Brazil,British Indian O. Terr.,Brunei Darussalam,Bulgaria,Burkina Faso,Burundi,Buthan,Cambodia,Cameroon,Canada,Cape Verde,Cayman Islands,Central African Rep.,Chad,Chile,China,Christmas Island,Cocos (Keeling) Isl.,Colombia,Comoros,Congo,Cook Islands,Costa Rica,Croatia,Cuba,Cyprus,Czech Republic,Czechoslovakia,Denmark,Djibouti,Dominica,Dominican Republic,East Timor,Ecuador,Egypt,El Salvador,Equatorial Guinea,Estonia,Ethiopia,Falkland Isl.(Malvinas),Faroe Islands,Fiji,Finland,France,France (European Ter.),French Southern Terr.,Gabon,Gambia,Georgia,Germany,Ghana,Gibraltar,Great Britain (UK),Greece,Greenland,Grenada,Guadeloupe (Fr.),Guam (US),Guatemala,Guinea,Guinea Bissau,Guyana,Guyana (Fr.),Haiti,Heard & McDonald Isl.,Honduras,Hong Kong,Hungary,Iceland,India,Indonesia,Iran,Iraq,Ireland,Israel,Italy,Ivory Coast,Jamaica,Japan,Jordan,Kazachstan,Kenya,Kirgistan,Kiribati,Korea (North),Korea (South),Kuwait,Laos,Latvia,Lebanon,Lesotho,Liberia,Libya,Liechtenstein,Lithuania,Luxembourg,Macau,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Marshall Islands,Martinique (Fr.),Mauritania,Mauritius,Mexico,Micronesia,Moldavia,Monaco,Mongolia,Montserrat,Morocco,Mozambique,Myanmar,Namibia,Nauru,Nepal,Netherland Antilles,Netherlands,Neutral Zone,New Caledonia (Fr.),New Zealand,Nicaragua,Niger,Nigeria,Niue,Norfolk Island,Northern Mariana Isl.,Norway,Oman,Pakistan,Palau,Panama,Papua New,Paraguay,Peru,Philippines,Pitcairn,Poland,Polynesia (Fr.),Portugal,Puerto Rico (US),Qatar,Reunion (Fr.),Romania,Russian Federation,Rwanda,Saint Lucia,Samoa,San Marino,Saudi Arabia,Senegal,Seychelles,Sierra Leone,Singapore,Slovak Republic,Slovenia,Solomon Islands,Somalia,South Africa,Spain,Sri Lanka,St. Helena,St. Pierre & Miquelon,St. Tome and Principe,St.Kitts Nevis Anguilla,St.Vincent & Grenadines,Sudan,Suriname,Svalbard & Jan Mayen Is,Swaziland,Sweden,Switzerland,Syria,Tadjikistan,Taiwan,Tanzania,Thailand,Togo,Tokelau,Tonga,Trinidad & Tobago,Tunisia,Turkey,Turkmenistan,Turks & Caicos Islands,Tuvalu,Uganda,Ukraine,United Arab Emirates,United Kingdom,United States,Uruguay,US Minor outlying Isl.,Uzbekistan,Vanuatu,Vatican City State,Venezuela,Vietnam,Virgin Islands (British)";
	var xCountry=sCountry.split(",");
	var str="";
	if (!isNotWithSelect)str+="<option value='' selected>Select Country</option>\n";else str+="<option value='' selected>Doesn't Matter</option>\n";
	for(i=0;i<xCountry.length; i++)
	if(xCountry[i]==defaultValue)str+="<option value='"+xCountry[i]+"' selected>"+xCountry[i]+"</option>\n";else str+="<option value='"+xCountry[i]+"'>"+xCountry[i]+"</option>\n";
	document.write(str);
}
function GetState()
{
	if (document.contactform.Country.value == "Australia"){
		document.getElementById('stateCombo').style.display= "block"
		document.getElementById('stateTxt').style.display = "none";
		document.getElementById('stateCombo').innerHTML = "<select name='State' class='textbox'><option value='QLD'>QLD</option><option value='NSW'>NSW</option><option value='VIC'>VIC</option><option value='WAS'>WAS</option><option value='SA'>SA</option><option value='TAS'>TAS</option><option value='ACT'>ACT</option><option value='NT'>NT</option></select>"
	}
	else if(document.contactform.Country.value == "United States"){
		document.getElementById('stateCombo').style.display= "block"
		document.getElementById('stateTxt').style.display = "none";
		document.getElementById('stateCombo').innerHTML = "<select name='State' class='textbox'><option value='AL'>ALABAMA</option><option value='AK'>ALASKA</option><option value='AZ'>ARIZONA</option><option value='AR'>ARKANSAN</option><option value='CA'>CALIFORNIA</option><option value='CO'>COLORADO</option><option value='CT'>CONNECTICUT</option><option value='DE'>DELAWARE</option><option value='DC'>DICTRICT OF COLUMBIA</option><option value='FL'>FLORIDA</option><option value='GA'>GEORGIA</option><option value='HI'>HAWAII</option><option value='ID'>IDAHO</option><option value='IL'>ILLINOIS</option><option value='IN'>INDIANA</option><option value='IA'>IOWA</option><option value='KS'>KANSAS</option><option value='KY'>KENTUCKY</option><option value='LA'>LOUISIANA</option><option value='ME'>MAINE</option><option value='MD'>MARYLAND</option><option value='MA'>MASSACHUSETTS</option><option value='MI'>MICHIGAN</option><option value='MN'>MINNESOTA</option><option value='MS'>MISSISSIPPI</option><option value='MO'>MISSOURI</option><option value='MT'>MONTANA</option><option value='NE'>NEBRASKA</option><option value='NV'>NEVADA</option><option value='NH'>NEW HAMPSHIRE</option><option value='NJ'>NEW JERSEY</option><option value='NM'>NEW MEXICO</option><option value='NY'>NEW YORK</option><option value='NC'>NORTH CAROLINA</option><option value='ND'>NORTH DAKOTA</option><option value='OH'>OHIO</option><option value='OK'>OKLAHOMA</option><option value='OR'>OREGON</option><option value='PA'>PENNSYLVANIA</option><option value='SC'>SOUTH CAROLINA</option><option value='SD'>SOUTH DAKOTA</option><option value='TN'>TENNESSEE</option><option value='TX'>TEXAS</option><option value='VT'>VERMONT</option><option value='VA'>VIRGINIA</option><option value='WA'>WASHINGTON</option><option value='WV'>WEST VIRGINIA</option><option value='WI'>WISCONSIN</option><option value='WY'>WYOMING</option></select>";
	}
	else{
		document.getElementById('stateCombo').style.display= "none"
		document.getElementById('stateTxt').style.display = "block";
	}
}

function fnValidate(){ 
	if (document.contactform.Name.value == ""){
		alert("Please enter the Name");
		document.contactform.Name.focus();
		return false;
	}
	if (document.contactform.Email.value == ""){
		alert("Please enter the Email Address");
		document.contactform.Email.focus();
		return false;
	}
	if (!fnValidateEMail()) return false;
	if (document.contactform.Subject.value == ""){
		alert("Please enter the Subject");
		document.contactform.Subject.focus();
		return false;
	}
	if (document.contactform.Message.value == ""){
		alert("Please enter your Message");
		document.contactform.Message.focus();
		return false;
	}
	if((document.contactform.Prove.value == "") || (document.contactform.Prove.value != 3))
	{
		document.contactform.Prove.value = "";
		alert("Please enter the correct answer");
		document.contactform.Prove.focus();
		return false;
	}
}
function fnValidateEMail()
	{
		var exp=/^(.)+@{1,1}((.)+\.(.)+)+$/;
		if (!exp.test(document.contactform.Email.value)){document.contactform.Email.value="";alert("Please enter a valid Email");document.contactform.Email.focus();return false} else return true;
	}
	
	
	
	