// ## contactUs.js

// 	Supplies the code that controls the location, size, and visibility of each drop down menu layer that appears below the selected menu item.



// FUNCTION LIST:

// 	positionLayers();

// 	checkLayer();

// 	clearLayers();



// TEMPLATE(S) USED:

// 	contact.html



// Sets the x and y coordinates of each layer depending on the user's browser.

function positionLayers() {

// this should be specific to browser & os

	if ((is.ie) && (is.mac)) { yPosition = 620;  }

	else if ((is.ns4) && (is.mac)) { yPosition = 585; }

	else if ((is.ns5) && (is.mac)) { yPosition = 610; }

	else if ((is.ns) && (is.mac)) { yPosition = 580; }

	else if ((is.ie) && (is.pc)) { yPosition = 590; }		

	else if ((is.ns4) && (is.pc)) { yPosition = 594; }

	else if ((is.ns5) && (is.pc)) { yPosition = 623; }

	else if ((is.ns) && (is.pc)) { yPosition = 600; }

		

	inquiry.moveTo(291,yPosition);

	dealer.moveTo(291,yPosition);

	contract.moveTo(291,yPosition);

	vehicle.moveTo(291,yPosition);

	other.moveTo(291,yPosition);

}



// Sets the visibility of each layer depending on the selected option from the dropdown menu.

function checkLayer() {

	// Retrieve the value of the current selected value of the drpTopic select box.

	var layerValue = document.frmTopic.drpTopic.selectedIndex;

	clearLayers();

	

			

	// Check the index value of the select box to determine which layer to show

	switch (layerValue) {

		case 0 : {break;}

		case 1 : {inquiry.show();break;}

		case 2 : {dealer.show();break;}

		case 3 : {contract.show();break;}

		case 4 : {vehicle.show();break;}

		case 5 : {other.show();break;}

		default : {break;}

	}

}



// Hides all layers.

function clearLayers(){

	inquiry.hide();

	dealer.hide();

	contract.hide();

	vehicle.hide();

	other.hide();

}







