		function AddToFavorites()
{
	if (document.all)
	{ // For Internet Explorer:
		window.external.AddFavorite("http://www.new-york-cleaners.com","New York Cleaners");
	}
	else if (window.sidebar)
	{ // For Firefox:
		window.sidebar.addPanel("New York Cleaners", "http://www.new-york-cleaners.com/", "");
	}
}
 
 
function ClickOnLink(oTD)
{
	location.href = oTD.childNodes[0].href;
}
 
var sDivCurrent="divSubMenuVer1";
var iMenuStatus = -1;
var t = 0;
 
function MenuDivHover()
{
	iMenuStatus = 1;
	clearTimeout(t);
}
 
function MenuDivOut()
{
	iMenuStatus = 0;
	t = setTimeout("clearSubMenus()", 100);
}
 
function MenuHover(oMenu, sSubMenuID)
{
	if (sDivCurrent.length > 0)
		clearSubMenu(document.getElementById(sDivCurrent));
	
	iMenuStatus = 1;
	oMenu.className = "mainmenuHover";
	
	var oTableContainer = oMenu.parentNode.parentNode.parentNode;
	document.getElementById(sSubMenuID).style.left = oMenu.offsetLeft + oTableContainer.offsetLeft + oTableContainer.parentNode.parentNode.parentNode.parentNode.parentNode.offsetLeft + "px";
	
	document.getElementById(sSubMenuID).style.display="block";
	sDivCurrent = sSubMenuID;
	clearTimeout(t);
}
 
function MenuOut()
{
	iMenuStatus = 0;
	t = setTimeout("clearSubMenus()", 100);
}
 
function SubMenuHover(oTD)
{
	iMenuStatus = 1;
	oTD.className = "submainmenuHover";
	
	var sThisSubMenuID = oTD.parentNode.parentNode.parentNode.parentNode.id;
	document.getElementById(sThisSubMenuID.replace("divSub", "td")).className = "mainmenuHover";
	sDivCurrent = sThisSubMenuID;
	clearTimeout(t);
}
 
function SubMenuOut(oTD)
{
	iMenuStatus = 0;
	oTD.className = "";
	t = setTimeout("clearSubMenus()", 100);
}
 
function ServiceSelectHover(oLink)
{
	if (sDivCurrent.length > 0)
		clearSubMenu(document.getElementById(sDivCurrent));
	
	iMenuStatus = 1;
	
	var sSubMenuID = "divServiceAreaSelect";
	document.getElementById(sSubMenuID).style.left = oLink.offsetLeft + oLink.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.offsetLeft + "px";
	
	document.getElementById(sSubMenuID).style.display="block";
	sDivCurrent = sSubMenuID;
	clearTimeout(t);
}
 
function ServiceSelectOut(oLink)
{
	iMenuStatus = 0;
	t = setTimeout("clearSubMenus()", 100);
}
 
function MenuClick(sLocation)
{
	clearSubMenu(document.getElementById(sDivCurrent));
	location.href = sLocation;
}
 
function clearSubMenus()
{
	if (iMenuStatus == 0)
	{
		if (sDivCurrent.length > 0)
			clearSubMenu(document.getElementById(sDivCurrent));
		
		var aSubMenus = tdSubMenus.getElementsByTagName("div");
		for (var m = 0; m < aSubMenus.length; m++)
		{
			clearSubMenu(aSubMenus[m]);
		}
		clearTimeout(t);
		iMenuStatus = -1;
	}
}
 
function clearSubMenu(oSubMenu)
{
	oSubMenu.style.display = "none";
	document.getElementById(oSubMenu.id.replace("divSub", "td")).className = "";
}
 
function check_email(e)
{
	ok ="1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++)
		if (ok.indexOf(e.charAt(i))<0)
			return (false);
			
	if (document.images) 
	{
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two))
			return (-1);
	}
}
function FormValidation(form)
{		
	var sMessage;			
	if (form.Comments.value.indexOf("http") >= 0)
	{
		sMessage = "Urls are not allowed in comments.";
		document.getElementById("Comments").focus();
	}
	if (!check_email(form.mail.value)) 
	{
		sMessage = "Invalid email address.";	
		document.getElementById("mail").focus();
	}		
	if (form.DayTel.value == "") 
	{
		sMessage = "Phone field is required.";		
		document.getElementById("DayTel").focus();
	}		
	if (form.FName.value == "") 
	{
		sMessage = "Full Name field is required.";	
		document.getElementById("FName").focus();
	}	
	if ( sMessage )		{			alert(sMessage);			return false;	
	}
	else	
	return true;	
}

function FormValidationContact(form)
{		
	var sMessage;			
	if (form.Comments.value.indexOf("http") >= 0)
	{
		sMessage = "Urls are not allowed in comments.";
		document.getElementById("Comments").focus();
	}
	if (!check_email(form.Email.value)) 
	{
		sMessage = "Invalid email address.";	
		document.getElementById("Email").focus();
	}			
	if (form.Name.value == "") 
	{
		sMessage = "Full Name field is required.";	
		document.getElementById("Name").focus();
	}	
	if ( sMessage )		{			alert(sMessage);			return false;	
	}
	else	
	return true;	
}
function FormValidationIndex(form)
{		
	var sMessage;			
	if (form.Phone.value == "") 
	{
		sMessage = "Phone field is required.";	
		document.getElementById("Phone").focus();
	}	
	if (form.Name.value == "") 
	{
		sMessage = "Name field is required.";	
		document.getElementById("Name").focus();
	}	
	if ( sMessage )		{			alert(sMessage);			return false;	
	}
	else	
	return true;	
}
	function openOrClose(sID)	
	{		
	if (document.getElementById(sID).style.display == "none")		
	document.getElementById(sID).style.display = "block";		
	else			
	document.getElementById(sID).style.display = "none";	
	}
