// JavaScript Document
    
	function swapClassAll(el,cl,cl2)
	{
		var aS=document.getElementsByTagName(el);
		for(var i=0; i<aS.length; i++)
		{
		  if(aS[i].className===cl)
		  {
				aS[i].className=cl2;
			}
		}
	 }

	function closeAllPops()
	{
		closePop('galleryMenu');
		closePop('artistMenu');
		closePop('artDetails');
	}
	
	function closeArtworkPops()
	{
		closePop('shippingDetails');
		closePop('purchaseDetails');
		closePop('artDetails');
		closePop('artRental');
	}

	function openArtworkPop(id)
	{
		closeArtworkPops();
		var popName=document.getElementById(id);
		popName.style.display='block';
	}
	
	function openPop(id)
	{
		var popName=document.getElementById(id);
		popName.style.display='block';
	}
	
	function openGalleries()
	{
		closeAllPops();
		openPop('galleryMenu');
	}
	
	
	function openArtists()
	{
		closeAllPops();
		openPop('artistMenu');
	}
	
	
	function openArtDetails()
	{
		closeAllPops();
		openPop('artDetails');
	}
	
	function openArtRental()
	{
		closeAllPops();
		openPop('artRental');
	}
	
	function openProspectiveArtists()
	{
		closeAllPops();
		openPop('ProspectiveArtists');
	}
	
	function closePop(id)
	{
		var popName=document.getElementById(id);
		popName.style.display='none';
	}
		
	
	function newURL(path)
	{
		closeAllPops();
		document.location = path;	
	}


	function newURLGlobal(path,id)
	{
		document.location = path;	
		var navDisplay = document.getElementById(id);
		navDisplay.style.display= "none";
	}
	
	function btnChange(id,newClass)	{
		var btn = document.getElementById(id);
		btn.className=newClass;
	}
	
	var win
	function openWin(file,w,h,scr,menu,stat,tool,name)
	{
		closeAllPops();
		win = window.open(file,name,"scrollbars="+scr+",resizable=yes,menubar="+menu+",status="+stat+",toolbar="+tool+",width="+w+",height="+h+",screenx=50,screeny=50,top=50,left=50");
		win.focus();
	}
	
	var win
	function openFlash(file)
	{
		closeAllPops();
		win = window.open(file,"FlashPopup","scrollbars=0,resizable=0,menubar=0,status=0,toolbar=0,width=800,height=605,screenx=50,screeny=50,top=50,left=50");
		win.focus();
	}
	
	
	var win
	function openSupport(file)
	{
		closeAllPops();
		win = window.open(file,"Support","scrollbars=0,resizable=0,menubar=0,status=0,toolbar=0,width=800,height=575,screenx=50,screeny=50,top=50,left=50");
		win.focus();
	}
	
	
	var win
	function openSupportWide(file)
	{
		closeAllPops();
		win = window.open(file,"Support","scrollbars=0,resizable=0,menubar=0,status=0,toolbar=0,width=910,height=575,screenx=50,screeny=50,top=50,left=50");
		win.focus();
	}
	
	var win
	function openPurchase(file)
	{
		closeAllPops();
		win = window.open(file,"Purchase","scrollbars=0,resizable=0,menubar=0,status=0,toolbar=0,width=655,height=405,screenx=50,screeny=50,top=50,left=50");
		win.focus();
	}
	
	function locationParent(url)
	{
		self.opener.location = url;
	}

