
/* ====================================================
General Site variables script
==================================================== */

pagelink		= document.location
pagename		= document.title
sitetitle		= 'AlfaStop © '
siteurl		= 'http://www.alfastop.co.uk'
developer		= 'Peaknet LTD'
developerurl 	= 'http://www.peaknet.co.uk'
eqClosedText	= 'Special announcement..\n\nThe Easy Quote system is unavailable. It is anticipated to be back in service in early or mid November.\n\n'
wlClosedText	= 'Special announcement..\n\nThe Wish List is unavailable. It is anticipated to be back in service in early or mid November.\n\n'



/* Script to disable/re-enable StyleSheet ... */

function cssOFF()	{document.styleSheets[0].disabled = true;		}
function cssON() 	{document.styleSheets[0].disabled = false; 	}



/* Functions copied over / extracted from /cgi-bin/html/head (11-03-2011) ... */
/* =============================================== */

function fullsize(theURL,winName,features)
{
	newWindow = window.open(theURL, winName, features);
	newWindow.focus();
}

function accWindow(url)
{
	newWindow = window.open(url, "AccWindow","width=650,height=450,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizeable=no");
}

function zoomWindow(url)
{
        newWindow = window.open(url, "zoomWindow","width=500,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizeable=yes");
        newWindow.focus();
}

function new_website_Window(url)
{
	newWindow = window.open(url, "ExternalWindow","width=800,height=600,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizeable=yes");
	newWindow.focus();
}

// Prompt Users to confirm they wish to Delete ...

function confirmation(Confirm_String)
{
	var answer = confirm(Confirm_String);

	//yes delete
	if(answer)
	{
		return true;
	}
	else //do not delete
	{
		return false;
	}
}

/* Add a Part to the Wish List ... */

function addWishList(productcode)
{
	//alert("addWishList1: "+productcode);

	//place product code in hidden input
	document.WishListForm.varcharProdCode.value=productcode;

	//alert("addWishList2: "+document.WishListForm.varcharProdCode.value);

	//submit form
	document.WishListForm.submit();
}



/* Detect for correct Browser ... */

if		(document.layers) { browser="n4"; }
else if	(document.all) { browser="ie"; }
else if	(!document.all && document.getElementById) { browser="n6"; }



/* Left menu rollover script ... */

function menuON(slot)		{ slot.className='menuslotON';	}
function menuOFF(slot)		{ slot.className='menuslot';	}
function mainmenuON(slot)	{ slot.className='mainmenuslotON'; }
function mainmenuOFF(slot)	{ slot.className='mainmenuslot'; }



/* HI-lite for form fields ... */

function hi(field)	{ field.className = 'formboxHI'; 	}
function lo(field)	{ field.className = 'formbox';		}


/* Previous Page ... */

function previous() { history.go(-1); }



/* Print Today's DATE function - Y2K + Netscape friendly ... */

var months=new Array(13);

months[1]	= "January";
months[2]	= "February";
months[3]	= "March";
months[4]	= "April";
months[5]	= "May";
months[6]	= "June";
months[7]	= "July";
months[8]	= "August";
months[9]	= "September";
months[10]	= "October";
months[11]	= "November";
months[12]	= "December";

var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;

function year() { document.write(year); }

defaultStatus	= sitetitle + year;


/* FAQ wish list open/close gizmo (jnm) */

var currentID = 'default';

function closeTheLot()
{
	if(currentID != '')
	{
		document.getElementById(currentID).className='hidden';
	}
}

function openUp(drawerName)
{
	if(drawerName != currentID)
	{
		document.getElementById(drawerName).className='visible'
		currentID = drawerName;
	}
	else
	{
		currentID = '';
	}

}


function addstyles(){

	//add addstyles() below function to activate

	//if(document.getElementById("allowEQhide"))
	//{
		//** Build js rendered stylesheet that css validators fail on **
		var jstyle = document.getElementsByTagName("head")[0];
		var lk = document.createElement("link");
		jstyle.appendChild(lk);
		lk.setAttribute("rel", "stylesheet");
		lk.setAttribute("type", "text/css");
		lk.setAttribute("href", "/js-vl.css");
	//}
}
//addstyles();



/* End of file */

