// JavaScript Document


function autoSubmit(form)
{
	window.location.href = form.shipMethod.options[form.shipMethod.selectedIndex].value;
}

button2 = new Image();
button2.src = "<?=$im?>/images/submitSecureButton-clicked.gif";
var theForm;
var requestSubmitted = false;
function disableButton(btn,form,buttonType) {
	if (!requestSubmitted){
		if (buttonType != null) {
			var buttonName = buttonType;
			btn.src = buttonName.src; // image swap happens here
		}
		theForm = form;
		btn.disabled = true;
		requestSubmitted = true;
		setTimeout("submitIt()", 250);
	} else {
		return false;
	}
}
function submitIt() {
	theForm.submit();
	return false;
}



// Generic function to open a window
function openAWindow( pageToLoad, winName, width, height, center, scroll) {
                        
    // if 'center' == 1, then center window, otherwise put in top left corner
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }

    // Window Properties
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=1,"
    + "scrollbars=" + scroll + ","
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    // open and focus window
    newWin = window.open( pageToLoad,winName,args );
    newWin.focus();
}

function goback()
{
	window.history.go(-1)
}

function goback2()
{
	window.history.go(-2)
}

function checkrequired(which) {
var message = "____________________________________________\n\n";
message +="The form was not submitted due to the following error(s).\n";
message += "Please correct these errors and resubmit\n";
message += "____________________________________________\n\n";
message += "The following required fields are empty:\n";

var pass=true;
var comma = "";
if (document.images) {
	for (i=0;i<which.length;i++) {
		var tempobj=which.elements[i];
		if (tempobj.name.substring(0,8)=="required") {
			if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
			tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
			tempobj.selectedIndex==0)||(tempobj.type=="checkbox"&&
			!tempobj.checked)) {
				shortFieldName=tempobj.name.substring(8,30);
				message += "\n" + shortFieldName.replace(/_/g," ");
				pass=false;
				comma = ", ";
         			}
     		 }
   	}
}
if (!pass) {
	alert(message);
	return false;
}
else
	return true;
}

function checkoptions(which) {
	var message = "____________________________________________\n\n";
	message += "Please select the options for the following:\n";

	var pass=true;
	var comma = "";
	if (document.images) {
		for (i=0;i<which.length;i++) {
			var tempobj=which.elements[i];
			if (tempobj.name.substring(0,9)=="reqoption") {
				if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
				tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
				tempobj.selectedIndex==0)) {
					shortFieldName=tempobj.name.substring(9,30);
					message += "\n" + shortFieldName.replace(/_/g," ");
					pass=false;
					comma = ", ";
         			}
     			 }
			if (tempobj.name.substring(0,13)=="requnivoption") {
				if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
				tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
				tempobj.selectedIndex==0)) {
					shortFieldName=tempobj.name.substring(13,34);
					message += "\n" + shortFieldName.replace(/_/g," ");
					pass=false;
					comma = ", ";
         			}
     			 }
			if (tempobj.name.substring(0,11)=="req_option_") {
				if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
				tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
				tempobj.selectedIndex==0)) {
					shortFieldName=tempobj.name.substring(11,32);
					message += "\n" + shortFieldName.replace(/_/g," ");
					pass=false;
					comma = ", ";
         			}
     			 }
   		}
	}
	if (!pass) {
		alert(message);
		return false;
	}
	else
		return true;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor,textcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor;
source.style.color=textcolor;
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor,originaltextcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor;
source.style.color=originaltextcolor;
}


function autoPriceFilterSubmit(form) {
		window.location.href = form.pfilter.options[form.pfilter.selectedIndex].value;
}

function autoMfgFilterSubmit(form) {
		window.location.href = form.mfgfilter.options[form.mfgfilter.selectedIndex].value;
}

/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip;



// POP UP LINK EXAMPLES
// <a href="popup.html" rel="popup|400|200">This is a popup link </a>;     
// <a href="http://en.wikipedia.org/wiki/City_Road" rel="external">This is an external link </a> 

 
/* addLoadEvent function allows you to stack up 'window.onload' events 
without them stepping on each other's toes. 
*/

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

/* accessible, unobtrusive popup code */
function windowLinks() {                      // create a new function called windowLinks(); 
	if(!document.getElementsByTagName) {      // Only run the function on browsers that
        	return;                              // understand 'getElementsByTagName' - new browsers
    	}
	
    	var anchors = document.getElementsByTagName("a"); // grab all links and pop them in an array called 'anchors'
    	for (var i = 0; i < anchors.length; i++) {        // start a loop to work our way through 
         	var anchor = anchors[i];                     // grab the next link & copy it to 'anchor' for working
        	var relIndex = anchor.rel;                   // get the value of it's 'REL' attribute
		if (relIndex){                               // does it have a value for REL?...
		 	var relSplit = relIndex.split("|");          
		 	/* if it does, look for '|' to use to split the value into an 
		 	array - relSplit[0], relSplit[1], relSplit[2], etc . If it doesn't 
		 	find any '|', the whole value gets transferred to relSplit[0] */
		 
			/* XHTML compliant target attribute */
		 	if (relSplit[0] == "external") {       // If the relSplit[0] is 'external'...
            			anchor.target = "_blank";           // then set it's 'target' attribute to '_blank'
				anchor.className = "external";      // then attach a CSS class to it 
				anchor.title = "Load in new window: "+ anchor.href;  
				// And give it a new title attribute to warn users a new window is launching
			
			/* Elegantly degrading window code */
   			} else if (relSplit[0] == "popup") {      // else if relSplit[0] is 'popup'...
				anchor.className = "popup";               // attach a CSS class to it 
				anchor.title = "Loads in a Popup Window"; // Give it a helpful title attribute
				anchor.popupWidth = relSplit[1];          // set the popup's width
				anchor.popupHeight = relSplit[2];          // set the popup's height
	        		anchor.onclick = function() {openAWindow(this.href,'console',this.popupWidth,this.popupHeight,1,1);return false;};
			}
		}
	}
} 

addLoadEvent(function() {
	windowLinks();	// run our new function as soon as the page loads. 
	//otherFunctions();
	//goHere();
});
  











function imageholderclass(){
	this.over=new Array();
	this.down=new Array();
	this.src=new Array();
	this.store=store;
	
	function store(src, down, over){
		var AL=this.src.length;
		this.src[AL]=new Image(); this.src[AL].src=src;
		this.over[AL]=new Image(); this.over[AL].src=over;
		this.down[AL]=new Image(); this.down[AL].src=down;
	}
}

var ih = new imageholderclass();
var mouseisdown=0;

function preloader(t){
	for(i=0;i<t.length;i++){
		if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){
			
			storeimages(t[i]);
			var checker='';
			checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';
			checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';
			
			switch(checker){
			case 'A' : mouseover(t[i]);mouseout(t[i]); break;
			case 'B' : mousedown(t[i]); mouseup2(t[i]); break;
			case 'AB' : mouseover(t[i]);mouseout(t[i]); mousedown(t[i]); mouseup(t[i]); break;
			default : return;			
			}
			
			if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}
		}
	}
}
function mouseup(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}

	}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}
	t.onmouseup=newmouseup;
}

function mouseup2(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}
		}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}
	t.onmouseup = newmouseup;
}

function mousedown(t){
	var newmousedown;
	if(t.onmousedown){
		t.oldmousedown=t.onmousedown;
		newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}
	}
	else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}
	t.onmousedown=newmousedown;
}

function mouseover(t){
	var newmouseover;
	if(t.onmouseover){
		t.oldmouseover=t.onmouseover;
		newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}
	}
	else{newmouseover=function(){this.src=this.getAttribute("srcover");}}
	t.onmouseover=newmouseover;
}

function mouseout(t){
	var newmouseout;
	if(t.onmouseout){
		t.oldmouseout=t.onmouseout;
		newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}
	}
	else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}
	t.onmouseout=newmouseout;
}

function storeimages(t){
	var s=(t.getAttribute('src'))?t.getAttribute('src'):'';
	var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';
	var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';
	ih.store(s,d,o);
}

function preloadimgsrc(){
	if(!document.getElementById) return;
	var it=document.getElementsByTagName('IMG');
	var it2=document.getElementsByTagName('INPUT');
	preloader(it);
	preloader(it2);
}

if(window.addEventListener){window.addEventListener("load", preloadimgsrc, false);} 
else{
	if(window.attachEvent){window.attachEvent("onload", preloadimgsrc);}
	else{if(document.getElementById){window.onload=preloadimgsrc;}}
}







/*
	Header Information------------------------------------[Do Not Remove This Header]--
	Title: OO Dom Image Rollover
	Description: This script makes it easy to add rollover/ mousedown 
  	effects to any image on the page, including image submit buttons. Automatically 
  	preloads images as well. Script works in all DOM capable browsers- IE5+, NS6+, 
  	Opera7+.
	
	Legal: Copyright 2005 Adam Smith
	Author Email Address: ibulwark@hotmail.com
	Date Created: June 6, 2005
	Website: Codevendor.com | eBadgeman.com
	Script featured on Dynamic Drive: http://www.dynamicdrive.com
	-----------------------------------------------------------------------------------
*/

function imageholderclass(){
	this.over=new Array();
	this.down=new Array();
	this.src=new Array();
	this.store=store;
	
	function store(src, down, over){
		var AL=this.src.length;
		this.src[AL]=new Image(); this.src[AL].src=src;
		this.over[AL]=new Image(); this.over[AL].src=over;
		this.down[AL]=new Image(); this.down[AL].src=down;
	}
}

var ih = new imageholderclass();
var mouseisdown=0;

function preloader(t){
	for(i=0;i<t.length;i++){
		if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){
			
			storeimages(t[i]);
			var checker='';
			checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';
			checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';
			
			switch(checker){
			case 'A' : mouseover(t[i]);mouseout(t[i]); break;
			case 'B' : mousedown(t[i]); mouseup2(t[i]); break;
			case 'AB' : mouseover(t[i]);mouseout(t[i]); mousedown(t[i]); mouseup(t[i]); break;
			default : return;			
			}
			
			if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}
		}
	}
}
function mouseup(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}

	}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}
	t.onmouseup=newmouseup;
}

function mouseup2(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}
		}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}
	t.onmouseup = newmouseup;
}

function mousedown(t){
	var newmousedown;
	if(t.onmousedown){
		t.oldmousedown=t.onmousedown;
		newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}
	}
	else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}
	t.onmousedown=newmousedown;
}

function mouseover(t){
	var newmouseover;
	if(t.onmouseover){
		t.oldmouseover=t.onmouseover;
		newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}
	}
	else{newmouseover=function(){this.src=this.getAttribute("srcover");}}
	t.onmouseover=newmouseover;
}

function mouseout(t){
	var newmouseout;
	if(t.onmouseout){
		t.oldmouseout=t.onmouseout;
		newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}
	}
	else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}
	t.onmouseout=newmouseout;
}

function storeimages(t){
	var s=(t.getAttribute('src'))?t.getAttribute('src'):'';
	var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';
	var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';
	ih.store(s,d,o);
}

function preloadimgsrc(){
	if(!document.getElementById) return;
	var it=document.getElementsByTagName('IMG');
	var it2=document.getElementsByTagName('INPUT');
	preloader(it);
	preloader(it2);
}

if(window.addEventListener){window.addEventListener("load", preloadimgsrc, false);} 
else{
	if(window.attachEvent){window.attachEvent("onload", preloadimgsrc);}
	else{if(document.getElementById){window.onload=preloadimgsrc;}}
}

function detectingFLASH() {
  var browser = navigator.userAgent.toLowerCase();
  flashVersion = 0;	
	// NS3+, Opera3+, IE5+ Mac
	if ( navigator.plugins != null && navigator.plugins.length > 0 ) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if ( typeof flashPlugin == 'object' ) { 
			if ( flashPlugin.description.indexOf('7.') != -1 ) flashVersion = 7;
			else if ( flashPlugin.description.indexOf('6.') != -1 ) flashVersion = 6;
			else if ( flashPlugin.description.indexOf('5.') != -1 ) flashVersion = 5;
			else if ( flashPlugin.description.indexOf('4.') != -1 ) flashVersion = 4;
			else if ( flashPlugin.description.indexOf('3.') != -1 ) flashVersion = 3;
		}
	} // IE4+ Win32 (VBscript)
	else if ( browser.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && browser.indexOf("win")!= -1 && browser.indexOf("16bit")== -1 ) {
	  document.write('<scr' + 'ipt language="VBScript"> n');
		document.write('on error resume next n');
		document.write('DIM obFlash n');
		document.write('SET obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") n');
		document.write('IF IsObject(obFlash) THEN n');
		document.write('flashVersion = 7 n');
		document.write('ELSE SET obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") END IF n');
		document.write('IF flashVersion < 7 and IsObject(obFlash) THEN n');
		document.write('flashVersion = 6 n');
		document.write('ELSE SET obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") END IF n');
		document.write('IF flashVersion < 6 and IsObject(obFlash) THEN n');
		document.write('flashVersion = 5 n');
		document.write('ELSE SET obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") END IF n');
		document.write('IF flashVersion < 5 and IsObject(obFlash) THEN n');
		document.write('flashVersion = 4 n');
		document.write('ELSE SET obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") END IF n');
		document.write('IF flashVersion < 4 and IsObject(obFlash) THEN n');
		document.write('flashVersion = 3 n');
		document.write('END IF');
	  document.write('</scr' + 'ipt> n');
  } // no Flash
  else {
	flashVersion = -1;
  }
return flashVersion;
}


function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}


/*
var whichBrowser = navigator.appName;
var whichVersion = parseFloat(navigator.appVersion);
var isOld;
if(((whichBrowser=='Microsoft Internet Explorer')&(whichVersion>=4)) | ((whichBrowser=='Netscape')&(whichVersion>=5))){
	isOld = 0;
	removeOldBrowserAlert();
} else { 
	isOld = 1;
	
}      
var alreadyWarned = 0;
function getPrice(qty){
	if(isOld){
		return;
	}

	if(!qty){
		var qty = 1;
	}
	var type = "";
	var value = "";
	var baseCost = eval(price);
	var retailCost = eval(retailPrice);
	var totalCost = "";
	for(var $i=0;$i<document.addToCart.length;$i++){
		var tmp = document.addToCart.elements[$i];
		if(tmp.type == "radio" && tmp.checked){
			if(tmp.id != '00.00'){
				value = eval(tmp.id);
				baseCost = baseCost + value;
			}
		} else if (tmp.type.toString().charAt(0)=="s" 
			&& tmp[tmp.selectedIndex].value != 0 
			&& tmp[tmp.selectedIndex].value != ''
			&& tmp.name != "ItemQuantity"){
			value = eval(tmp[tmp.selectedIndex].id);
			baseCost = baseCost + value;
		} else if (tmp.type == "checkbox" && tmp.checked){
			if(tmp.id != '00.00'){
				value = eval(tmp.id);
				baseCost = baseCost + value;
			}
		}
	}
	totalCost = baseCost * qty;
	updateDisplays(baseCost,retailCost,totalCost);
}
*/

function updateDisplays(unitCost,retailCost,totalCost) {
   	var dollars = Math.floor(unitCost);
   	var cents = unitCost - dollars;
   	cents = Math.round(cents*100);
   	if(cents==0){
		cents = ".00";
	} else if(cents<10){
		cents = ".0"+cents;
	} else{
		cents = "."+cents;
	}	
	if(document.getElementById('unitprice')){
		document.getElementById('unitprice').innerHTML = "$"+dollars+cents; 
	}
	if(document.getElementById('unitprice2')){
		document.getElementById('unitprice2').innerHTML = "$"+dollars+cents;
	}
  
   	var dollars = Math.floor(retailCost);
   	var cents = retailCost - dollars;
   	cents = Math.round(cents*100);
   	if(cents==0){
		cents = ".00";
	} else if(cents<10){
		cents = ".0"+cents;
	} else{
		cents = "."+cents;
	}	
	if(document.getElementById('retailprice')){
		document.getElementById('retailprice').innerHTML = "$"+dollars+cents; 
	}
	if(document.getElementById('retailprice2')){
		document.getElementById('retailprice2').innerHTML = "$"+dollars+cents;
	}

	var dollars = Math.floor(totalCost);
   	var cents = totalCost - dollars;
   	cents = Math.round(cents*100);
   	if(cents==0){
		cents = ".00";
	} else if(cents<10){
		cents = ".0"+cents;
	} else{
		cents = "."+cents;
	}
	if(document.getElementById('totalprice')){
   		document.getElementById('totalprice').innerHTML = "$"+dollars+cents; 
	}
	if(document.getElementById('totalprice2')){
   		document.getElementById('totalprice2').innerHTML = "$"+dollars+cents; 
	}
}

function showOldBrowserAlert() {
	var msg = "Display of pricing changes requires Netscape 6.0+ or Internet Explorer 5.0+.\n";
	msg += "The correct price will be displayed after you select your options and add the item to your cart.\n\n";
	msg += "This does not affect your ability to purchase items from our store, \n";
	msg += "so please continue to shop and we apologize for this annoying message.\n\n";
	msg += "If you experience any problems ordering from us, please call us Toll-Free \n";
	msg += "at the number above for assistance with your purchase.  Thank You.";
   	alert(msg);
	alreadyWarned = 1;
}

function removeOldBrowserAlert(){
	if(document.getElementById('browserAlert')){
		document.getElementById('browserAlert').innerHTML = "";
	}
}





