function xmlhttpFive(pickURL, showResult)
{
	
	var xmlHttpReq1 =false;
		if(window.XMLHttpRequest)
		{
			xmlHttpReq1 = new XMLHttpRequest();
//			xmlHttpReq1.overrideMimeType('text/plain');
		}
		else if (window.ActiveXObject){
			xmlHttpReq1= new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlHttpReq1.open('POST', pickURL);
		xmlHttpReq1.setRequestHeader('Content-type','application/x-www-form-urlencoded');
		xmlHttpReq1.onreadystatechange = function () {
			if(xmlHttpReq1.readyState == 4) {
				fiveResponse = xmlHttpReq1.responseText;
				eval(showResult + '(fiveResponse);');
			}
		}
		xmlHttpReq1.send('');
}

function xmlhttpPost(strURL,strSubmit,strResultFunc) {
   var xmlHttpReq = false;
	// Mozilla/Safari
	if (window.XMLHttpRequest) {
			xmlHttpReq = new XMLHttpRequest();
//                xmlHttpReq.overrideMimeType('text/xml');
	}
	// IE
	else if (window.ActiveXObject) {
			xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
	if (xmlHttpReq.readyState == 4) {
           strResponse = xmlHttpReq.responseText;
           switch (xmlHttpReq.status) {
                   // Page-not-found error
                   case 404:
                           alert('Error: Not Found. The requested URL ' + 
                                   strURL + ' could not be found.');
                           break;
                   // Display results in a full window for server-side errors
                   case 500:
                           handleErrFullPage(strResponse);
                           break;
                   default:
                           // Call JS alert for custom error or debug messages
                           if (strResponse.indexOf('Error:') > -1 || 
                                   strResponse.indexOf('Debug:') > -1) {
                                   alert(strResponse);
                           }
                           // Call the desired result function
                           else {
							  		
							   //return false;
							 	//alert(strResponse);
							    eval(strResultFunc + '(strResponse);');
                           }
                           break;
           }
   }
   else {
	   //document.getElementById("loader_div").innerHTML = '<img src=\'./images/indicator_002.gif\'>';
   }
 }	
    xmlHttpReq.send(strSubmit);
}


function xmlhttpPost11(strURL,strSubmit,strResultFunc) {
   var xmlHttpReq = false;
         // Mozilla/Safari
        if (window.XMLHttpRequest) {
			    xmlHttpReq = new XMLHttpRequest();
//                xmlHttpReq.overrideMimeType('text/xml');
		}
        // IE
        else if (window.ActiveXObject) {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
	if (xmlHttpReq.readyState == 4) {
           strResponse = xmlHttpReq.responseText;
           switch (xmlHttpReq.status) {
                   // Page-not-found error
                   case 404:
                           alert('Error: Not Found. The requested URL ' + 
                                   strURL + ' could not be found.');
                           break;
                   // Display results in a full window for server-side errors
                   case 500:
                           handleErrFullPage(strResponse);
                           break;
                   default:
                           // Call JS alert for custom error or debug messages
                           if (strResponse.indexOf('Error:') > -1 || 
                                   strResponse.indexOf('Debug:') > -1) {
                                   alert(strResponse);
                           }
                           // Call the desired result function
                           else {
							  		 
							   //return false;
							    eval(strResultFunc + '(strResponse);');
                           }
                           break;
           }
   }
   else {
	   //document.getElementById("loader_div").innerHTML = '<img src=\'./images/indicator_002.gif\'>';
   }
 }	
    xmlHttpReq.send(strSubmit);
}

function xmlhttpPostPromotion(strURL,strSubmit,strResultFunc) {
   var xmlHttpReq = false;
         // Mozilla/Safari
        if (window.XMLHttpRequest) {
			    xmlHttpReq = new XMLHttpRequest();
             //   xmlHttpReq.overrideMimeType('text/xml');
		}
        // IE
        else if (window.ActiveXObject) {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
	if (xmlHttpReq.readyState == 4) {
           strResponse = xmlHttpReq.responseText;
           switch (xmlHttpReq.status) {
                   // Page-not-found error
                   case 404:
                           alert('Error: Not Found. The requested URL ' + 
                                   strURL + ' could not be found.');
                           break;
                   // Display results in a full window for server-side errors
                   case 500:
                           handleErrFullPage(strResponse);
                           break;
                   default:
                           // Call JS alert for custom error or debug messages
                           if (strResponse.indexOf('Error:') > -1 || 
                                   strResponse.indexOf('Debug:') > -1) {
                                   alert(strResponse);
                           }
                           // Call the desired result function
                           else {
							  		 
							   //return false;
							    eval(strResultFunc + '(strResponse);');
                           }
                           break;
           }
   }
   else {
	   //document.getElementById("loader_div").innerHTML = '<img src=\'./images/indicator_002.gif\'>';
   }
 }	
    xmlHttpReq.send(strSubmit);
}


function xmlhttpPostSub(strURL,strSubmit,strResultFunc) {
   var xmlHttpReq = false;
         // Mozilla/Safari
        if (window.XMLHttpRequest) {
			    xmlHttpReq = new XMLHttpRequest();
//                xmlHttpReq.overrideMimeType('text/xml');
		}
        // IE
        else if (window.ActiveXObject) {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
        }
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
	if (xmlHttpReq.readyState == 4) {
           strResponse = xmlHttpReq.responseText;
           switch (xmlHttpReq.status) {
                   // Page-not-found error
                   case 404:
                           alert('Error: Not Found. The requested URL ' + 
                                   strURL + ' could not be found.');
                           break;
                   // Display results in a full window for server-side errors
                   case 500:
                           handleErrFullPage(strResponse);
                           break;
                   default:
                           // Call JS alert for custom error or debug messages
                           if (strResponse.indexOf('Error:') > -1 || 
                                   strResponse.indexOf('Debug:') > -1) {
                                   alert(strResponse);
                           }
                           // Call the desired result function
                           else {
							  		
							   //return false;
							  // alert(strResponse);
							    eval(strResultFunc + '(strResponse);');
                           }
                           break;
           }
   }
   else {
	   //document.getElementById("loader_div").innerHTML = '<img src=\'./images/indicator_002.gif\'>';
   }
 }	
    xmlHttpReq.send(strSubmit);
}

function handleErrFullPage(strIn) {

        var errorWin;

        // Create new window and display error
        try {
                errorWin = window.open('', 'errorWin');
                errorWin.document.body.innerHTML = strIn;
        }
        // If pop-up gets blocked, inform user
        catch(e) {
                alert('An error occurred, but the error message cannot be' +
                        ' displayed because of your browser\'s pop-up blocker.\n' +
                        'Please allow pop-ups from this Web site.');
        }
}
