function VBPT(field){d = document.forms.VBP; d.field.value = d.MV.value}

function ACAX(PID,RDIV){
	URL = 'index.cfm?PG=cart&CM=insert&PID=' + PID + '&QTY=1';
	//DIVID_ACAX = RDIV;
	xmlHttp_ACAX=GetXmlHttpObject_ACAX(); 
	if (xmlHttp_ACAX==null){alert ("Your Browser does not support HTTP Request"); return}; 
	xmlHttp_ACAX.onreadystatechange=stateChanged_ACAX;xmlHttp_ACAX.open("GET",URL,true); xmlHttp_ACAX.send(null)
}
function stateChanged_ACAX(){if (xmlHttp_ACAX.readyState==4 || xmlHttp_ACAX.readyState=="complete"){ 
		//document.getElementById(DIVID_ACAX).innerHTML= '<b><font color="#FF0000"><NOBR>Added To Cart</NOBR></font></b>'
	} 
} 
function GetXmlHttpObject_ACAX(){var objXMLHttp=null; if (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()} else if (window.ActiveXObject){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")} return objXMLHttp}


function CRelation(PID,upSellPID,RDIV,rType){
	
		URL = '/AJAX/parts_upsell.cfm?PID=' + PID + '&upSellPID=' + upSellPID + '&rType=' + rType;
		DIVID_CRelation = RDIV;
		xmlHttp_CRelation=GetXmlHttpObject_CRelation(); 
		if (xmlHttp_CRelation==null){alert ("Your Browser does not support HTTP Request"); return}; 
		xmlHttp_CRelation.onreadystatechange=stateChanged_CRelation;xmlHttp_CRelation.open("GET",URL,true);
		xmlHttp_CRelation.send(null)
}
function stateChanged_CRelation(){if (xmlHttp_CRelation.readyState==4 || xmlHttp_CRelation.readyState=="complete"){ document.getElementById(DIVID_CRelation).innerHTML=xmlHttp_CRelation.responseText } } 
function GetXmlHttpObject_CRelation()	{var objXMLHttp=null; if (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()} else if (window.ActiveXObject){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")} return objXMLHttp}

function copyText(obj) {
	if (obj.type=="text" || obj.type=="textarea"){var rng = obj.createTextRange();} 
	else {var rng = document.body.createTextRange();rng.moveToElementText(obj);}
	rng.scrollIntoView();rng.select();rng.execCommand("Copy")
}
function pasteText(obj) {
	if (obj.type=="text" || obj.type=="textarea"){var rng = obj.createTextRange();} 
	else {var rng = document.body.createTextRange();rng.moveToElementText(obj);}
	rng.scrollIntoView();rng.select();rng.execCommand("Paste")
}

function C1(URL,RDIV){DIVID_C1 = RDIV;xmlHttp_C1=GetXmlHttpObject_C1(); if (xmlHttp_C1==null){alert ("Your Browser does not support HTTP Request"); return}; xmlHttp_C1.onreadystatechange=stateChanged_C1;xmlHttp_C1.open("GET",URL,true); xmlHttp_C1.send(null)}
function stateChanged_C1(){if (xmlHttp_C1.readyState==4 || xmlHttp_C1.readyState=="complete"){ document.getElementById(DIVID_C1).innerHTML=xmlHttp_C1.responseText } } 
function GetXmlHttpObject_C1()	{var objXMLHttp=null; if (window.XMLHttpRequest){objXMLHttp=new XMLHttpRequest()} else if (window.ActiveXObject){objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")} return objXMLHttp}


/* POPUP Functions -----------------------------------------------------------------------------------*/
/* DEPRECATED - see GMP.js
function cartPop(action,PID){
	switch(action){
		case 'add': alert('hi');
	}
	var cartPopWin = document.getElementById("cartWin");
	if(action == 'add'){
		ACAX(PID,'cartStatus');
		alert('The Item Has Been Added To Your Shopping Cart');
		//cartPopWin.style.top 	= document.body.clientHeight/2 - 150 + document.body.scrollTop + "px";
		//cartPopWin.style.left 	= document.body.clientWidth/2 - 55 + "px";		
		//cartPopWin.style.visibility = "visible";		
	};
	if(action == 'close'){cartPopWin.style.visibility = "hidden";};
}
*/



