function tabOpen(param) 
{
	var tabArray = ["chelsea_gallery", "soho_gallery"]; 	
	var tabArrayM = ["tab1op", "tab2op"];
	
	var tabArrayNumber = tabArray[param];
	var tabArrayNumberM = tabArrayM[param];
	
	var tabMain = document.getElementById("main_gallery");
	
	
		for(x=0;x<tabArray.length; x++)
		{
			if (tabArray[x] != tabArrayNumber)
			{
				var tabClose = document.getElementById(tabArray[x]);
				tabClose.style.display="none";	
		    }
		}
		
		for(y=0;y<tabArrayM.length; y++)
		{
			if (tabArrayM[y] != tabArrayNumberM)
			{
				var tabCloseM = document.getElementById(tabArrayM[y]);
				tabCloseM.style.backgroundImage="url(http://thevinylfactory.com/wp-content/themes/modularity_new_vf/images/button.png)";
				tabCloseM.style.color="#000";
		    }
		}	
	
	tabMain.style.display="none";
				
	var tabNumber = document.getElementById(tabArrayNumber);
	$(tabNumber).fadeIn('slow');
	if(param==0)
	{
		chelseaMap.location.reload();
	} else {
		sohoMap.location.reload();
	}
				
	var tabNumberM = document.getElementById(tabArrayNumberM);
	tabNumberM.style.backgroundImage="url(http://thevinylfactory.com/wp-content/themes/modularity_new_vf/images/button_selected.png)";
	tabNumberM.style.color="#FFF";
	
}

function doClear(theText) 
{
     if (theText.value == theText.defaultValue) {
         theText.value = ""
     }
}

