//TEST SEARCHfunction findit(){//if (event.keyCode == "13")//{	self.location.href = window.document.forms[0].PathInfo.value + "/ViewSearch?SearchView&Query="+ window.document.getElementById('searchstr').value;//}}//ROW TESTfunction trOn(obj,Totfield){alert(Totfield);	if (window.document.getElementById(obj+'tr').bgColor != '#e5edf8')		{		window.document.getElementById(obj+'tr').bgColor = '#e5edf8';		window.document.getElementById(obj+'set').value = 'Yes';		}	else	{		window.document.getElementById(obj+'tr').bgColor = '#ffffff';		window.document.getElementById(obj+'set').value = '';		window.document.getElementById(Totfield).value = 0;	}//	pass to fields}//SHOW MENUSfunction shwMnu(MenuName){	LastOpenedMenuCol = window.document.getElementById(MenuName+'td').style.backgroundColor;		var tdTrigL = window.document.getElementById(MenuName + 'td');	var mTable = window.document.getElementById(MenuName);	var curleft = 0;	while (tdTrigL.offsetParent)	{		curleft += tdTrigL.offsetLeft;		tdTrigL = tdTrigL.offsetParent;	}	var tdTrigT = window.document.getElementById(MenuName + 'td');	var curtop = 0;	while (tdTrigT.offsetParent)	{		curtop += tdTrigT.offsetTop;		tdTrigT = tdTrigT.offsetParent;	}	mTable.style.left = curleft;	mTable.style.top = curtop + 19;	window.document.getElementById(LastOpenedMenu).style.display = 'none';	window.document.getElementById(MenuName).style.display = 'block';//	window.document.getElementById(MenuName + 'td').style.backgroundColor = '#98CB00';	LastOpenedMenu = MenuName;		}		// CLOSES MENUS WHEN A NON-LINK IS CLICKED ===function mnuCls(e){	if(e)	{		var obj = e.target	}	else	{		var obj = event.srcElement	}	if(obj.nodeName != 'A' && obj.nodeName != 'INPUT' && obj.nodeName != 'TEXTAREA')	{		window.document.getElementById(LastOpenedMenu + 'td').style.backgroundColor = LastOpenedMenuCol		window.document.getElementById(LastOpenedMenu).style.display = 'none'	}}document.onmouseup = mnuCls;		function rsz(){	window.document.getElementById(LastOpenedMenu).style.display = 'none';}	// TURNS SECTION ONfunction btnon(){	if ((window.document.forms[0].MenuID.value != 'MNUGallery') && (window.document.forms[0].MenuID.value != 'MNUGalleryList'))	{//	window.document.getElementById((window.document.forms[0].MenuID.value) + 'td').style.backgroundColor = '#98CB00';	window.document.getElementById((window.document.forms[0].MenuID.value) + 'txt').style.color = '#5F97D4';	}}//SHOW AN OBJECT BY IDfunction oShw(oNme){	window.document.getElementById(oNme).style.display = '';}	//HIDE AN OBJECT BY IDfunction oHde(oNme){	window.document.getElementById(oNme).style.display = 'none';}//SUBMIT VALUESfunction sbmt(){	//Validate mandatory entries first	if (window.document.getElementById('CTitle').value == "") 	{		alert("You MUST fill in your Title");		window.document.getElementById('CTitle').focus();		return;	}	if (window.document.getElementById('CSurname').value == "") 	{		alert("You MUST fill in your Surname");		window.document.getElementById('CSurname').focus();		return;	}		if (window.document.getElementById('CTelephone').value == "") 	{		alert("You MUST fill in your Telephone Number");		window.document.getElementById('CTelephone').focus();		return;	}		if (window.document.getElementById('CTown').value == "") 	{		alert("You MUST fill in your Location");		window.document.getElementById('CTown').focus();		return;	}	window.frames.SBMFR.document.getElementById('Title').value = window.document.getElementById('CTitle').value;	window.frames.SBMFR.document.getElementById('FirstName').value = window.document.getElementById('CFirstName').value;	window.frames.SBMFR.document.getElementById('SurName').value = window.document.getElementById('CSurName').value ;	window.frames.SBMFR.document.getElementById('Telephone').value = window.document.getElementById('CTelephone').value;	window.frames.SBMFR.document.getElementById('Mobile').value = window.document.getElementById('CMobile').value;	window.frames.SBMFR.document.getElementById('Town').value = window.document.getElementById('CTown').value;	window.frames.SBMFR.document.getElementById('Email').value = window.document.getElementById('CEmail').value;	window.frames.SBMFR.document.getElementById('Comment').value = window.document.getElementById('CComment').value;	window.frames.SBMFR.document.getElementById('PageStyle').value = window.document.getElementById('PageStyle').value;	if (window.document.getElementById('PageStyle').value == "PageSellSubmit") 	{	window.frames.SBMFR.document.getElementById('SellMake').value = window.document.getElementById('CSellMake').value;	window.frames.SBMFR.document.getElementById('SellYear').value = window.document.getElementById('CSellYear').value;	window.frames.SBMFR.document.getElementById('SellLastService').value = window.document.getElementById('CSellLastService').value;	window.frames.SBMFR.document.getElementById('SellAwning').value = window.document.getElementById('CSellAwning').value;	window.frames.SBMFR.document.getElementById('SellSmokePet').value = window.document.getElementById('CSellSmokePet').value;	window.frames.SBMFR.document.getElementById('SellHP').value = window.document.getElementById('CSellHP').value;	window.frames.SBMFR.document.getElementById('SellDeliver').value = window.document.getElementById('CSellDeliver').value;	}	else	{	window.frames.SBMFR.document.getElementById('BuySpec').value = window.document.getElementById('CBuySpec').value;	window.frames.SBMFR.document.getElementById('BuyBerths').value = window.document.getElementById('CBuyBerths').value;	window.frames.SBMFR.document.getElementById('BuyBudget').value = window.document.getElementById('CBuyBudget').value;	window.frames.SBMFR.document.getElementById('BuyEquipRC').value = window.document.getElementById('CBuyEquipRC').value;	window.frames.SBMFR.document.getElementById('BuyEquipMM').value = window.document.getElementById('CBuyEquipMM').value;	window.frames.SBMFR.document.getElementById('BuyEquipAW').value = window.document.getElementById('CBuyEquipAW').value;	window.frames.SBMFR.document.getElementById('BuyEquipSH').value = window.document.getElementById('CBuyEquipSH').value;	window.frames.SBMFR.document.getElementById('BuyEquipAC').value = window.document.getElementById('CBuyEquipAC').value;	window.frames.SBMFR.document.getElementById('BuyEquipRF').value = window.document.getElementById('CBuyEquipRF').value;	window.frames.SBMFR.document.getElementById('BuyEquipS').value = window.document.getElementById('CBuyEquipS').value;	window.frames.SBMFR.document.getElementById('BuyEquipM').value = window.document.getElementById('CBuyEquipM').value;	window.frames.SBMFR.document.getElementById('BuyOtherEquip').value = window.document.getElementById('CBuyOtherEquip').value;	}	//window.frames.SBMFR.FileSSubmit.click();	window.frames.SBMFR.document._SSubmit.submit();	alert('Thank you ' + window.frames.SBMFR.document.getElementById('Title').value + ' '+window.frames.SBMFR.document.getElementById('Surname').value + ' your comments have been submitted.')	//history.back()	self.location.href = window.document.forms[0].DocLocation.value + '?OpenDocument';}