/* ====================================================
General Site variables script
==================================================== */

pagelink		= document.location
pagename		= document.title
sitename		= 'sealskinz.com'
siteurl			= 'http://www.sealskinz.com'
developer		= 'Peaknet LTD'
developerurl		= 'http://www.peaknet.co.uk'
setupdomain		= 'http://www.sealskinz.com/'
defaultStatus		= siteurl
software		= navigator.appName

/* ====================================================
Print the year
==================================================== */

var now		= new Date
thisyear	= now.getYear()

if (thisyear <= 1900) { thisyear = thisyear + 1900 }


/* ====================================================
Shopping Cart CODE
==================================================== */

function showcart()

// { alert('Basket contents will show now'); }
{
var cart_window = window.open("http://www.sealskinz.com/psShowCart.htm","shopping_cart","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,height=500,width=550");
}


/* ====================================================
Determine location of viewed file to create correct root_path value
==================================================== */

if ((location.protocol=="file:") && (pagetype==0))	{ root_path = "./"		} 
else if (location.protocol=="file:" && pagetype==1)	{ root_path = "/"		}
else							{ root_path = "/"		}


/* ====================================================
NEW Detect for correct browser to determine CSS file
==================================================== */

if (document.all)					{ browser="ie"; }
else if	(document.layers)		 		{ browser="n4"; }   
else if (!document.all && document.getElementById && software=="Opera")	{ browser="Opera"; }
else if (!document.all && document.getElementById)	{ browser="n6"; }
else if (software=="")					{ browser="Mozilla"; }



if	(browser == "n4") 				{ document.write('<LINK REL="STYLESHEET" HREF="' + root_path + 'n4.css">'); }
else if	(browser == "ie" || browser == "Opera")		{ document.write('<LINK REL="STYLESHEET" HREF="' + root_path + 'ie.css">'); }
else if (browser == "n6" || browser == "Mozilla") 	{ document.write('<LINK REL="STYLESHEET" HREF="' + root_path + 'n6.css">'); }



/* ====================================================
MENU image rollover pre-loader
==================================================== */

/* var preGfx = new Array(7);

preGfx[0] = "/gfx/menu/home2.gif";
preGfx[1] = "/gfx/menu/basket2.gif";
preGfx[2] = "/gfx/menu/how2.gif";
preGfx[3] = "/gfx/menu/recipes2.gif";
preGfx[4] = "/gfx/menu/enquiries2.gif";
preGfx[5] = "/gfx/menu/shop2.gif";
preGfx[6] = "/gfx/menu/email2.gif"


for (i=0; i < preGfx.length; i++)

	{
	var preload = new Image();
	preload.src = preGfx[i];
	}
*/

/* ====================================================
Left menu rollover script
==================================================== */

//	function mON(slot)	{ slot.className='menuitemON';	}
//	function mOFF(slot)	{ slot.className='menuitem';	}

function mON(slot)	{ }
function mOFF(slot)	{ }


/* ====================================================
Bookmark / Add to Favorites script
==================================================== */

function bookmark()

{ 
if (browser == "ie") { external.AddFavorite(pagelink,pagename) }
	
else if (browser == "n4") 			{ alert('press control and D now!') }
else if (navigator.appName == "Opera") 		{ alert('press control and T now!') }
}


/* ====================================================
Pulldown MENU functions
==================================================== */

function page_select()

{
  	selected=document.hopper.destinations.value;
	loc=selected;
	window.open(loc, '_self')
}



/* ====================================================
Send page to friend
==================================================== */

function sendlink() { window.location='mailto:?subject=Take a look at this!&body=' + pagename + ' : ' + pagelink }


/* ====================================================
Previous Page
==================================================== */

function previous() { history.go(-1); }


/* ====================================================
Netherlands and Belgium Wolvenberg redirection
==================================================== */


