function changeSubValue(strValue){
	if(document.all){
		document.all["Subscription"].value = strValue;
	}
	
	else if(document.getElementById){
		document.getElementById("Subscription").value = strValue;
	}
}

function showhide(layer_on, layer_off)
{
  var is_ns4 = navigator.appName.indexOf('Netscape', 0) != -1 && !document.getElementById;

  var is_ns6 = navigator.appName.indexOf('Netscape', 0) != -1 && document.getElementById;

  if(is_ns4)
	{
    document.layers[layer_on].visibility ='show'
    document.layers[layer_off].visibility ='hide'
	}
  else if(is_ns6) 
	{
    document.getElementById(layer_on).style.display = 'block';
    document.getElementById(layer_off).style.display = 'none';
	}
  else if(document.all)
	{
    document.all(layer_on).style.display ='block'
    document.all(layer_off).style.display ='none'
	}
}

function ProperCase(frmObj)
{
	var index;
	var tmpStr;
	var tmpChar;
	var preString;
	var postString;
	var strlen;

	tmpStr = frmObj.value.toLowerCase();
	strLen = tmpStr.length;

	if (strLen > 0)
		{
		for (index = 0; index < strLen; index++)
			{
			if (index == 0)
				{
				tmpChar = tmpStr.substring(0,1).toUpperCase();
				postString = tmpStr.substring(1,strLen);
				tmpStr = tmpChar + postString;
				}
			else
				{
				tmpChar = tmpStr.substring(index, index+1);
				if (tmpChar == " " && index < (strLen-1))
					{
					tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
					preString = tmpStr.substring(0, index+1);
					postString = tmpStr.substring(index+2,strLen);
					tmpStr = preString + tmpChar + postString;
					}
				}
			}
		}
	frmObj.value = tmpStr;
}


//*************************************************************
//  Navigation Menu Functions
//*************************************************************
var intCurrentMenu   =  0;
var intActivityDelay =  850;
var objActivityTimer =  null;
var blnInactive      =  true;

function menuOpen(intMenu){
	//Purpose:  Opens the menu with the given id.
	//Accepts:  intMenu - The id of the menu.
	//Returns:  intCurrentMenu - Sets the id of the currently open menu.

	//Set local variables.
	strMenuName = "immpopup" + intMenu;
	strCurrent  = "immpopup" + intCurrentMenu;

	//Clear the activity timer.
	clearTimeout(objActivityTimer);

	if(intCurrentMenu != 0 && intCurrentMenu != intMenu){
		//Close all other menus.
		if(document.all) document.all[strCurrent].style.visibility = "hidden";
		else if(document.layers) document.layers[strCurrent].visibility = "hide";
		else if(document.getElementById) document.getElementById(strCurrent).style.visibility = "hidden";
	}

	//Open the menu.
	if(document.all) document.all[strMenuName].style.visibility = "visible";
	else if(document.layers) document.layers[strMenuName].visibility = "show";
	else if(document.getElementById) document.getElementById(strMenuName).style.visibility = "visible";

	intCurrentMenu = intMenu;
}


function menuClose(intMenu){
	//Purpose:  Closes the menu with the given id.
	//Accepts:  intMenu        - The id of the menu.
	//Returns:  intCurrentMenu - Sets the id of the currently open menu.

	if(intCurrentMenu != 0) {
		//If 0 is passed as a parameter, close the currently open menu.
		if(intMenu == 0) intMenu = intCurrentMenu;

		//Set local variables.
		strMenuName = "immpopup" + intMenu;

		//Close the menu.
		if(document.all) document.all[strMenuName].style.visibility = "hidden";
		else if(document.layers) document.layers[strMenuName].visibility = "hide";
		else if(document.getElementById) document.getElementById(strMenuName).style.visibility = "hidden";

		intCurrentMenu = 0;
	}
}


function activityCheck(){
	//Purpose:  Close the currently opened menu if no activity is detected.
	//Accepts:  Nothing.
	//Returns:  Nothing.

	//Clear the activity timer.
	clearTimeout(objActivityTimer);

	//Close the menu.
	if(blnInactive && intCurrentMenu != 0) menuClose(intCurrentMenu);
}


function activityTimer(){
	//Purpose:  Starts a timer that calls the function activityCheck.
	//Accepts:  Nothing.
	//Returns:  Nothing.
	objActivityTimer = setTimeout("activityCheck();",intActivityDelay);
}


// ALERT FUNCTION
function whatAreAlert(){
	alert("Please call us on +34 902 636 115 to obtain the latest catalogue. Thank you.");
	}
	
// PRODUCT SUBMIT

