var gn_number_of_screenshot = 26;
var gn_number_of_screenshot_for_wow_bible = 6;
var gs_screenshot_filename = "screenshot";

function goto_page(cboTarget)
{
	var sPageName = cboTarget.options[cboTarget.selectedIndex].value
	var sPageURL =  sPageName.substring(8,sPageName.length);
	var sShowMode = sPageName.substring(0,8);
	
	if (sShowMode=="CurPage:")
	{
		self.location=sPageURL;
	}
	
	else if (sShowMode=="NewPage:")
	{
		window.open(sPageURL);
	}
}

function LoadTheMostUpdatedPage(sPath,sShowMode)
{
	sToday = new Date();
	var nYear = sToday.getFullYear();
	var nMonth = sToday.getMonth() + 1;
	var nDate = sToday.getDate();
	var nTime = sToday.getTime();
	var sFullDate = nYear + "" + nMonth + "" + nDate + nTime;
	var sFullURL = sPath + "?" + sFullDate;

	if (sShowMode=="SelfPg:")
	{
	self.location=sFullURL;
	}
	
	else if (sShowMode=="NewWin:")
	{
	window.open(sFullURL);
	}
}

function GetURLForBrowsers(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v4.0
	var newURL='', verStr=navigator.appVersion, app=navigator.appName, version = parseFloat(verStr);
	if (app.indexOf('Netscape') != -1)
	{
		if (version >= NSvers)
		{
			if (NSpass>0) newURL=(NSpass==1)?URL:altURL;
		}
		else
		{
			if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;
		}
	}
	else if (app.indexOf('Microsoft') != -1)
	{
		if (version >= IEvers || verStr.indexOf(IEvers) != -1)
		{
			if (IEpass>0) newURL=(IEpass==1)?URL:altURL;
		}
	
		else
		{
			if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;
		}
	}
	
	else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
	
	if (newURL) 
	{
		return newURL;
	}
}

function write_footer()
{
	document.write("Copyright &copy;2005, Tomato House Limited. All rights reserved.");
}

function goto_screenshot(nscreen_index, nlast_screen_index, scurrent_filename)
{
	if ((nscreen_index < nlast_screen_index) | (nscreen_index == nlast_screen_index))
	{
		self.location = scurrent_filename + nscreen_index + ".htm";
	}
}