// ELS :: v3.0 :: 10-7-2008 18:37:03


// Close the Spaw WYSIWYG Editor
function closeSpaw()
{
	var curl = document.URL;
	var nurl = curl.replace("&edit","");
	var nurl = nurl.replace("?edit","");
	document.location = nurl;
}

// Ask before forwarding
function rusure(confirmtxt, destination)
{
	if( confirm( confirmtxt ) )
	{
		if( destination )
			document.location = destination;
			
		return true;
	}
	else
		return false;		
}

// Preload Images
function preloadImages() 
{
	var d=document; 
	if(d.images)
	{ 
		if(!d.p) 
			d.p=new Array();
			
		var i,
				j=d.p.length,
				a=preloadImages.arguments;
		
		for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0)
		{ 
			d.p[j]=new Image; 
			d.p[j++].src=a[i];
		}
	}
}
