<!--
function popC(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=300');");
}
function createRequestObject() {
	var ro;
	ro = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
	return ro;
}

var http = createRequestObject();

function wrapbox(){
		currentpx=document.getElementById('pricediv0').innerHTML;
		http.open("get", "vsadmin/inc/ajaxgiftwrap.php?mainprodprice="+currentpx);
		http.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
		http.onreadystatechange = handleWrapResponse;
		http.send(null);
}

function handleWrapResponse() {
	if(http.readyState == 4){
		var response = http.responseText;
		var update = new Array();
		wrapboxdiv=document.getElementById("wrapboxpop");
		if (response){
			if (wrapboxdiv.style.display!="none")	{
				Effect.SlideUp(wrapboxdiv.id);
			//	wrapboxdiv.style.display="none";
				document.getElementById('wrappxh').value='0';
	//			document.getElementById('wrapselect').selectedIndex='-1';
	//			updateprice0();
			} else {
				wrapboxdiv.innerHTML=response;
				//wrapboxdiv.style.position="relative";
				Effect.SlideDown("wrapboxpop");
	//			document.getElementById("wrapboxchild").style.display="block";
	//			document.getElementById("wrapboxpop").style.display="block";
//				wrapboxdiv.style.display="block";
	//			updateprice0();
			}
		}
	}
}

function wrapupdate(id,mainprice){
	http.open("get", "vsadmin/inc/ajaxgiftwrap.php?giftid="+id+"&mainprodprice="+mainprice);
	http.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	http.onreadystatechange = handleWrapSelectResponse;
	http.send(null);
}

function handleWrapSelectResponse(){
	if(http.readyState == 4){
		var response = http.responseText;
		var update = new Array();
		update=response.split("|");
		currentpx=update[0];
		gotwrappx=update[1];
		gotwrapid=update[2];
		switch (gotwrapid){
			case "1": optid=928; break;
			case "2": optid=929; break;
			case "3": optid=930; break;
			default: optid=928;
		}
		wrapcheck=document.getElementById('wrapcheck');
		wrappxh=document.getElementById('wrappxh');
		document.getElementById('wrappx').innerHTML='+ %'+(gotwrappx/10)+' ('+formatprice(Math.round((((1000-(-gotwrappx))/1000)*currentpx)*100)/100,'','')+')';
		document.getElementById('optn5').value=optid;
		wrappxh.value=gotwrappx;
		wrapcheck.value=gotwrapid;
		updateprice0();
	}
}





// -->
