// Global Variables
var mmouseoverfontWeight, mmouseoverfontStyle, mmouseoverbackgroundColor, mmouseovercursor, mmouseoverbackgroundImage;

function MSetNavBarDownID(navbarid, newClass)
{
	var obj = document.getElementById(navbarid);
	obj.className=newClass;
}	


function MStatusBar(o,n)
{
	if(n==1) {		//Mouse Over
		mmouseoverfontWeight = o.style.fontWeight;
		o.style.fontWeight = "bold";
		mmouseoverfontStyle = o.style.fontStyle;
		o.style.fontStyle = "normal";
		mmouseoverbackgroundColor = o.style.backgroundColor;
		o.style.backgroundColor = "#ffff00";
		mmouseoverbackgroundImage = o.style.backgroundImage;
		o.style.backgroundImage = 'url(/Graphics/White_to_LYellow_1px_by_25px.png)';
		o.style.backgroundRepeat = "repeat-x";
		mmouseovercursor = o.style.cursor;
		o.style.cursor = "hand";
	} else if(n==0) {		//MouseOut
		o.style.fontWeight = mmouseoverfontWeight;
		o.style.fontStyle = mmouseoverfontStyle;
		o.style.backgroundColor = mmouseoverbackgroundColor;
		o.style.backgroundImage = mmouseoverbackgroundImage;
		o.style.cursor = mmouseovercursor;
	}
}


var oFadeObj = {
	o:0,
	nTim:0,
	nSiz:0,
	nDir:0,
	nDst:0
};


function SizeFade() {
	oFadeObj.o.style.fontSize = (oFadeObj.nSiz + "pt");
	if (oFadeObj.nSiz != oFadeObj.nDst) {
		oFadeObj.nSiz += oFadeObj.nDir;
		oFadeObj.nTim = setTimeout("SizeFade()",66);
	} else {
		clearTimeout(oFadeObj.nTim);
		oFadeObj.nTim = 0;
	}
}


// Global Variables
var mclickedbackground = '#FFFFDD';	//Color of the link after you click it even on mouseout :)
var malreadyclicked = 0;	//Have I clicked?  If so, ignore future attempts to set background static

function MClickedALink(obj, choice)
{
	var oPF, i;

	if(malreadyclicked != 0) {
		return;
	}
	malreadyclicked = 1;
	
	obj.parentNode.old_bgColor = mclickedbackground;
	obj.parentNode.style.backgroundColor = mclickedbackground;

	oPF = document.forms.frmPost;

	switch(choice) {
	case '1':
		oPF = "http://www.perrycomputerservices.com/index.htm";
		break;
	case '2':
		oPF = "http://www.perrycomputerservices.com/quickpricing.htm";
		break;
	case '3':
		oPF = "http://www.perrycomputerservices.com/services.htm";
		break;
	case '4':
		oPF = "http://www.perrycomputerservices.com/products.htm";
		break;
	case '5':
		oPF = "http://www.perrycomputerservices.com/contactus.htm";
		break;
	case '6':
		oPF = "http://www.perrycomputerservices.com/onlinestore.htm";
		break;
	case '7':
		oPF = "http://www.perrycomputerservices.com/technicalhelp.htm";
		break;
	case '8':
		oPF = "http://www.perrycomputerservices.com/companyinfo.htm";
		break;
		

	default:
		alert("ERROR - Fallthrough in SWITCH statement in Z_PIECE_main_navbar.js");
		return false;
	}
	 location.href = oPF;	//Go to the new page unless it's the parts page...
}