
function showMenu(id)
	{
		var browserName=navigator.appName;
		if (browserName=="Microsoft Internet Explorer")
		{
			document.getElementById(id).style.display='block';
		}
	}
	
function hideMenu(id)
	{
		var browserName=navigator.appName;
		if (browserName=="Microsoft Internet Explorer")
		{
			document.getElementById(id).style.display='none';
		}
	}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Takes two variables:
		product_id: id of the product on which the user has clicked
		filePathy: from which file the user clicked the product (eg:categories, product_details etc).  This even includes the query stry string and url
		
		Returns the form where the user can select the attribute values and enter the quantity.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
function getQuantity(product_id,filePath,imagePath)
	{
	//document.getElementById('form_item_id_container').innerHTML += '<input type="hidden" value='+product_id+' name= "item_id" >';
	//document.getElementById('falconiformes_overlay_image_box').innerHTML = "<img src='"+img+"' alt='' />";
	//document.getElementById('delete').style.display = 'block';
	//document.getElementById('item_qty_form').item_qty.focus();
	new Ajax.Request('_functions/overlay_form.inc.php',
					 {
					 	method:'post',
					 	parameters:{product_id:product_id, filePath:filePath,imagePath:imagePath},
					 	onSuccess:function(transport)
					 	{
							 var response = transport.responseText;
						 	//alert(response);
							document.getElementById("overlay_form_inc_container").innerHTML = response;
							document.getElementById('overlay_form_inc_container').style.display = 'block';
							document.getElementById('item_qty_form').item_qty.focus();
					 	},
					 	onFailure:function(){ alert('Something went wrong...') }
					 });
	}
	
function getEmailtoFriend(product_id)
	{
		$('mail_to_friend_form').style.display = "block";
		$('form_item_id_container').innerHTML = '<input type="hidden" value="'+product_id+'" name= "product_id" />';
		document.getElementById('email_to_friend').email_to_name.focus();
	}	
	
function changeValue(id)
{
 	fieldValue = document.getElementById(id).value;
 	
 	if(id=='fe_user_login_user_name' && fieldValue == 'Uw e-mailadres')
 	{
 		document.getElementById('fe_user_login_user_name').value = '';
 	}
 	if(id=='fe_user_login_user_password' && fieldValue == 'Uw inlogcode')
 	{
 		document.getElementById('fe_user_login_user_password').value = '';
 	}
 	if(fieldValue == "Uw e-mail adres" && id=="newsletter_email")
 	{
 		document.getElementById(id).value = '';
 	}
}

function stopScroll()
{
	window.scroll(0,0);
}
function lockScroll()
{	  
 if (document.all)
	{               
		document.body.scroll = "no";
	}
	else
	{
		//var oTop = document.body.scrollTop;
		document.body.style.overflow = "hidden";
		//document.body.scrollTop = oTop;
	}
}

function unlockScroll()
{
   document.body.scroll = "yes";
   document.body.style.overflow = "visible";
}

/*Key board monitor function that closes the overlays if at all any is open */
document.onkeydown = function(oEvent)
{
	oEvent = oEvent || window.event;
	keyPressedCode = oEvent.keyCode;
	if(keyPressedCode==27)
	{
		var OverlayElements = document.getElementsByClassName("overlay_conatiner");
		for(i=0;i<OverlayElements.length;i++)
		{
			document.getElementById(OverlayElements[i].id).style.display = "none";
		}
		unlockScroll();
	}
}

/*
function tb_getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
	arrayPageSize = [w,h];
	return arrayPageSize;
}
*/



