// JavaScript Document


var type = "IE";	//Variable used to hold the browser name
var agt=navigator.userAgent.toLowerCase();
BrowserSniffer();

//detects the capabilities of the browser
function BrowserSniffer() {
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) type="OP";		//Opera
	else if (document.all) Department="IE";														//Internet Explorer e.g. IE4 upwards
	else if (document.layers) Department="NN";													//Netscape Communicator 4
	else if (!document.all && document.getElementById) Department="MO";							//Mozila e.g. Netscape 6 upwards
	else if (agt.indexOf("safari") != -1) Department="SF";							            //Safari
	else Department = "IE";		//I assume it will not get here
}

function contactInfo(form) {
function HideLayer(id, action){
	if (type=="IE") eval("document.all." + id + ".style.display='none'");
	if (type=="NN") eval("document." + id + ".display='" + action + "'");
	if (type=="MO" || type=="OP" || type=="SF") eval("document.getElementById('" + id + "').style.display='" + action + "'");
}
HideLayer('CustomerService', 'none');
HideLayer('Sales', 'none');
HideLayer('Wholesale', 'none');
HideLayer('EduSales', 'none');
HideLayer('TechSupport', 'none');
HideLayer('WebSite', 'none');
HideLayer('Other', 'none');
HideLayer('Catalog', 'none');
HideLayer('Feedback', 'none');

capt=form.Department.value;
if(capt=="Sales"){
if(type=="MO"){
	 ShowLayer('Sales', 'table-cell');
	 }
	 else{
	  ShowLayer('Sales', 'block');
	  }
}else if(capt=="Wholesale"){
	if(type=="MO"){
	 ShowLayer('Wholesale', 'table-cell');
	 }
	 else{
	  ShowLayer('Wholesale', 'block');
	  }
}else if(capt=="CustomerService"){
	if(type=="MO"){
	 ShowLayer('CustomerService', 'table-cell');
	 }
	 else{
	  ShowLayer('CustomerService', 'block');
	  }
}else if(capt=="EduSales"){
	if(type=="MO"){
	 ShowLayer('EduSales', 'table-cell');
	 }
	 else{
	  ShowLayer('EduSales', 'block');
	  }
}else if(capt=="TechSupport"){
if(type=="MO"){
	 ShowLayer('TechSupport', 'table-cell');
	 }
	 else{
	  ShowLayer('TechSupport', 'block');
	 }
}else if(capt=="WebSite"){
if(type=="MO"){
	 ShowLayer('WebSite', 'table-cell');
	 }
	 else{
	  ShowLayer('WebSite', 'block');
	 }
}else if(capt=="Other"){
if(type=="MO"){
	 ShowLayer('Other', 'table-cell');
	 }
	 else{
	  ShowLayer('Other', 'block');
	 }
}else if(capt=="Catalog"){
if(type=="MO"){
	 ShowLayer('Catalog', 'table-cell');
	 }
	 else{
	  ShowLayer('Catalog', 'block');
	 }
}else if(capt=="Stores"){
if(type=="MO"){
	 ShowLayer('Stores', 'table-cell');
	 }
	 else{
	  ShowLayer('Stores', 'block');
	 }	 
}else if(capt=="Feedback"){
if(type=="MO"){
	 ShowLayer('Feedback', 'table-cell');
	 }
	 else{
	  ShowLayer('Feedback', 'block');
	 }

}
}


function ShowLayer(id, action){
	if (type=="IE") eval("document.all." + id + ".style.display='" + action + "'");
	if (type=="NN") eval("document." + id + ".display='" + action + "'");
	if (type=="MO" || type=="OP" || type=="SF") eval("document.getElementById('" + id + "').style.display='" + action + "'");

}
