		function getxmlhttp (){
		//Create a boolean variable to check for a valid microsoft active X instance.
		var xmlhttp = false;
		
		//Check if we are using internet explorer.
		try {
			//If the javascript version is greater than 5.
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			//If not, then use the older active x object.
			try {
				//If we are using internet explorer.
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				//Else we must be using a non-internet explorer browser.
				xmlhttp = false;
			}
		}
		
		//If we are using a non-internet explorer browser, create a javascript instance of the object.
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			xmlhttp = new XMLHttpRequest();
		}
		
		return xmlhttp;
	}
	
	//Function to process an XMLHttpRequest.
	function processajax (obj, serverPage){
		//Get an XMLHttpRequest object for use.
		var theimg;
		xmlhttp = getxmlhttp ();
		xmlhttp.open("GET", serverPage);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				document.getElementById(obj).innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	}
	
	
	
	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function uploadimg(theform)
{
theform.submit();	
}

function doneloading(theframe,thefile)
{
var theloc = "showimg.php?thefile=" + thefile
theframe.processajax ("showimg",theloc);
}

function imageuploaderror(theframe,errors)
{
var theloc = "image_upload_error.php?error=" + errors
theframe.processajax ("errors",theloc);
}	
	
function updatecheckbox(querystringvalue, add_or_remove)
{
var theloc = "update_checkbox.php?checkbox_id=" + querystringvalue + '&add_or_remove=' + add_or_remove
processajax (querystringvalue,theloc);
}	

	





////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//FOR THE SHOPPING CART POP UP
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function xmlhttpPost(strURL, whichone, xyz) {

    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, whichone, xyz);
        }
    }
    self.xmlHttpReq.send(getquerystring(whichone, xyz));
}

function getquerystring(whichone, xyz) {

    var form     = document.forms['f1_'+whichone];
    var word = form.word.value;
	
	//if (form.checked == false) { var boxcheck = '&checked=false'; }
	 //document.write(document.forms['f1_'+whichone]);
	if (document.forms['f1_'+whichone].checkbox.checked == false)  var boxcheck = '&checked=false'; 
	if (document.forms['f1_'+whichone].checkbox.checked == true)  var boxcheck = '&checked=true'; 
	
	
    qstr = 'w=' + escape(word) + boxcheck + '&xyz=' + xyz;  // NOTE: no '?' before querystring
    return qstr;
}

function updatepage(str, whichone, xyz){
   // document.getElementById("result_"+whichone).innerHTML = str;
	document.getElementById("email_list").innerHTML = str;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
