// JavaScript Document
function wiganHotels()
{
}
function wiganAccommodation()
{
}
function wiganWeddingVenues()
{
}
function conferenceVenuesWigan()
{
}
function functionsEventsWigan()
{
}
function switchImg(img)
{	
	if(img.src.indexOf("_f2") != -1)
		img.src = img.src.replace(/_f2/, "");
		
	else
	{
		img.src = img.src.replace(/\.gif/, "_f2\.gif");
		img.src = img.src.replace(/\.jpg/, "_f2\.jpg");
		img.src = img.src.replace(/\.png/, "_f2\.png");
	}
}
function show(id)
{
	if(document.getElementById)
	{
		var obj = document.getElementById(id);
		if(obj)
			obj.style.display = "block";
	}
}

function hide(id)
{
	if(document.getElementById)
	{
		var obj = document.getElementById(id);
		if(obj)
			obj.style.display = "none";
	}
}
function openWindow(url, winName, top, left, width, height, scrll)
{
	this.width = arguments.length > 4 ? width : 800;
	this.height = arguments.length > 5 ? height : 340;
	this.scrll = arguments.length > 6 ? scrll : "yes";
	
	return window.open(url,winName,"width="+this.width+",height="+this.height+",location=no,toolbar=no,menubar=no,titlebar=yes,scrollbars="+this.scrll+",resizable=no,top="+top+",left="+left);
}

function doLink(url, w, h, bScroll)
{	
	var left = screen.availWidth > 800 ? 50 : 0;
	var top = screen.availHeight > 480 ? 50 : 0;
	
	var width = arguments.length > 1 ? w : 640;
	var height = arguments.length > 2 ? h : 480;
	
	var scrll = arguments.length > 3 ? "yes" : "no";

	
	if(childWin && !childWin.closed)
	{
		childWin.location = url;
		childWin.focus();
		return;
	}				
	
	childWin = openWindow(url, "ChildWindow", top, left, width, height, scrll);
}

function killChild()
{
	try
	{
		if(childWin && !childWin.closed)
			childWin.close();
	}
	catch(ex)
	{}
}
function doPrint(url)
{
	doLink(url, 700, 500, false);
	childWin.print();
}

var childWin = null;
onfocus = killChild;