// JavaScript Document
<!--
window.wm_menu = '';

function flameOn(the_id)
{
var source = document.getElementById(the_id);
source.className = 'ineedhover';
}

function flameOff(the_id)
{
var source = document.getElementById(the_id);
source.className = 'ineednormal';
}

function showMe(id) { //v2.0
  window.location='index.php?page_id='+id;
}

function openMe(id) { //v2.0
  window.open('index.php?page_id='+id,'detailview','width=500,height=500,scrollbars=none,toolbar=none');
}

function showref(a,b) {
	if(b==1) {
		document.getElementById(a).style.display = 'block';
	} else {
		if(document.getElementById(a).style.display != 'block') {
			document.getElementById(a).style.display = 'block';
		} else {
			document.getElementById(a).style.display = 'none';
		}
	}
}

function dd() {
	window.clearTimeout(wm_menu);
	window.wm_menu = setTimeout("hideall()",250);
}

function dt() {
	window.clearTimeout(wm_menu);
}

function hideall() {
	document.getElementById('products_dd').style.display = 'none';
}

function updateWeight(q1,w1,d1) {
//	alert('updateWeight: '+q1+', '+w1+', '+d1);
	var q= document.getElementById(q1).value;
	var w= document.getElementById(w1).value;
	var d= document.getElementById(d1).value;
	if(w<1) {
		document.getElementById(q1).value=0;
		document.getElementById(w1).value=0;
	}
}

function updateQuantity(q1,w1,d1) {
	//alert('updateQuantity: '+q1+', '+w1+', '+d1);
	var q= document.getElementById(q1).value;
	var w= document.getElementById(w1).value;
	var d= document.getElementById(d1).value;
	if(q<1) {
		document.getElementById(q1).value=0;
		document.getElementById(w1).value=0;
	}
}


function numbersonly(myfield, e, dec) {
	var key;
	var keychar;
	if (window.event)
		key = window.event.keyCode;
	else if (e)
		key = e.which;
	else
		return true;
	keychar = String.fromCharCode(key);
	// control keys
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
		return true;
	// numbers
	else if ((("0123456789.").indexOf(keychar) > -1))
		return true;
	// decimal point jump
	else if (dec && (keychar == ".")) {
		myfield.form.elements[dec].focus();
		return false;
	}
	else
		return false;
}
//-->