function lightglow(pic) {

	document.getElementById('lightglow').innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><img src="' + pic + '" onclick="darkglow();" style="cursor:pointer; border:solid #ffffff; border-width:5px;"></td></tr></table>';
	document.getElementById('lightglow').style.display = '';
	
}

function darkglow() {

	document.getElementById('lightglow').style.display = 'none';
	
}

function ws_handler(id) {

	send_w_ajax_2(id, document.getElementById('item_num_'+id).value, 'cart.php', 'cart_div');
	
}

function ws_handler_2(id) {

	send_w_ajax_2(id, '0', 'cart.php', 'cart_div');
	
}

function ws_handler_3(hashlist, numlist) {

	send_w_ajax_2(hashlist, numlist, 'order.php', 'cart_div');
	
}

function highlight(aprice, id) {

	send_w_ajax_2(aprice, id, 'highlight.php', '');
	
}

function send_w_ajax_1(data, file, target) {

	data = data.replace(/&/g,'[and]');
	data = data.replace(/\+/g,'[plus]');

	var xmlHttp=null;

	if (window.XMLHttpRequest) {

		xmlHttp=new XMLHttpRequest();

	} else if (window.ActiveXObject) {

		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

	}

  	xmlHttp.onreadystatechange=function() {

		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 

			document.getElementById(target).innerHTML=xmlHttp.responseText;

		} 

	}

	xmlHttp.open("POST", file, true);

	if(data != 'NULL') {

		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttp.send("data=" + data);

	} else {

		xmlHttp.send(null);

	}

}

function send_w_ajax_2(data, data2, file, target) {

	data = data.replace(/&/g,'[and]');
	data = data.replace(/\+/g,'[plus]');
	
	data2 = data2.replace(/&/g,'[and]');
	data2 = data2.replace(/\+/g,'[plus]');

	var xmlHttp=null;

	if (window.XMLHttpRequest) {

		xmlHttp=new XMLHttpRequest();

	} else if (window.ActiveXObject) {

		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

	}

  	xmlHttp.onreadystatechange=function() {

		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 

			document.getElementById(target).innerHTML=xmlHttp.responseText;

		} 

	}

	xmlHttp.open("POST", file, true);

	if(data != 'NULL') {

		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttp.send("data=" + data + "&data2=" + data2);

	} else {

		xmlHttp.send(null);

	}

}
