function league(str) {  // This function does the AJAX request
 
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "league3.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "p1="+ str;
	

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);

}

function getHttpResemail( ) {
  if (http.readyState == 4 && http.status == 200) { 
    res = http.responseText;  // These following lines get the response and update the page
    document.getElementById('txtemail').innerHTML=res
  }
}

function getHttpRes( ) {
  if (http.readyState == 4 && http.status == 200) { 
    res = http.responseText;  // These following lines get the response and update the page
    document.getElementById('txt1').innerHTML=res
  }
}

function getHttpResa( ) {
  if (http.readyState == 4 && http.status == 200) { 
    res = http.responseText;  // These following lines get the response and update the page
    document.getElementById('txta').innerHTML=res
  }
}

function getXHTTP() {
var xhttp;
if (!xhttp && typeof XMLHttpRequest != 'undefined') {
try {xhttp = new XMLHttpRequest();} catch (e) {xhttp = false;}
}

if(!xhttp && typeof ActiveXObject != "undefined"){
   try{ xhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xhttp=false;}
   if(!xhttp)try{ xhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xhttp=false;}
  }

return xhttp;
}

function getXHTTPppppp( ) {
  var xhttp;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers…
      xhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttp = new XMLHttpRequest();
	    } catch (e3) {
	      xhttp = false;
	    }
      }
    }
  return xhttp; // Return the XMLHTTP object
}

var http = getXHTTP(); // This executes when the page first loads.

function ajaxsearch() {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "test.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "q=" + encodeURI(document.googleform.q.value)+
	"&ie=" + encodeURI(document.googleform.ie.value)+
	"&cx=" + encodeURI(document.googleform.cx.value)+
	"&link1=" + encodeURI(document.googleform.q.value);

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
  http.send(params);
}

function product(cat) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "products.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "cat="+ cat;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function gotoitem(itemid) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "viewitem.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "itemid="+ itemid;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function view2(id1) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "keepers.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "id1="+ id1;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function gopage(str) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", str + ".php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "p1="+ str;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function firstpage(str,id1) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", str, true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "lmtd=" + encodeURI(document.nextfrm.next.value)+
		"&id1=" + id1;

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
  http.send(params);
}

function lastpage(str,id1) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", str, true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "lmtd=" + encodeURI(document.nextfrm.next.value)+
		"&id1=" + id1;

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
  http.send(params);
}

function nextpage(str,id1) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", str, true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "lmtd=" + encodeURI(document.nextfrm.next.value)+
		"&id1=" + id1;

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
  http.send(params);
}

function prevpage(str,id1) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", str, true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
  var params = "lmtd=" + encodeURI(document.nextfrm.next.value)+
		"&id1=" + id1;

  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
  http.send(params);
}

function onbtn(x)
{
document.getElementById(x).style.background="#74CBE9";
document.getElementById(x).style.color="#FFFFFF";
}



function offbtn(x)
{
document.getElementById(x).style.background="#FFFFFF";
document.getElementById(x).style.color="#00008B";
}

function onbtn2(x)
{
document.getElementById(x).style.background="#74CBE9";
document.getElementById(x).style.color="#FFFFFF";
}

function offbtn2(x)
{
document.getElementById(x).style.background="#FF0000";
document.getElementById(x).style.color="#FFFF00";
}

function gotolink(str) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "blog2.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "link1=" + str;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function gotolink7(linkpage){
document.getElementById("linkform").link8.value = linkpage;
document.getElementById("linkform").link1.value = encodeURI(linkpage);
document.getElementById("linkform").submit();
}

function ajaxsearch2(){
document.getElementById("googleform2").submit();
}

function contact() {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "emailsent.php", true);
  http.onreadystatechange = getHttpResemail;

	
  // Make our POST parameters string…
 var params = "details=" + encodeURI(document.contactform.details.value)+
 "&name1=" + encodeURI(document.contactform.name1.value)+
 "&sendto=" + encodeURI(document.contactform.sendto.value)+
 "&email=" + encodeURI(document.contactform.email.value);
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
 
}


function showhide(ee,er)
{
//Checking if select field is enabled
if (document.getElementById(er).name == 'green')
{
//Changing the select field state to disabled and changing the value of button to enable
document.getElementById(ee).style.display = 'block';
document.getElementById(er).name = 'red'
return
}
//Checking if select field is disabled
if (document.getElementById(er).name != 'green')
{
//Changing the select field state to enabled and changing the value of button to disable
document.getElementById(ee).style.display = 'none';
document.getElementById(er).name = 'green'

return
}
}

function mylist(ee) { if
(document.getElementById(ee).style.display=="none")
(document.getElementById(ee).style.display="block") ;
else (document.getElementById(ee).style.display="none") ; }



function mylistc(ee,ej) { if
((document.getElementById(ee).style.display=="block")&&(document.getElementById(ej).style.display=="none"))
(document.getElementById(ee).style.display="block") 
(document.getElementById(ej).style.display="block") ;
else if ((document.getElementById(ee).style.display=="block")&&(document.getElementById(ej).style.display=="block"))
(document.getElementById(ee).style.display="none")
(document.getElementById(ej).style.display="none") ; }

function mylistb(ee) {
 (document.getElementById(ee).style.display="none") ; }
 
 function mylistccc(ee) {
 (document.getElementById(ee).style.display="none") ; }
 
 
 function mylista(ee) {
 (document.getElementById(ee).style.display="block") ; }

function mylistg(ee) { if
(document.getElementById(ee).style.display=="none")
(document.getElementById(ee).style.display="block") ;
else (document.getElementById(ee).style.display="none") ; }


function mylisth(ee) { if
(document.getElementById(ee).style.display=="none")
(document.getElementById(ee).style.display="block") ;
else (document.getElementById(ee).style.display="none") ; }

function lbnext(prodid,lbox2) {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "items.php", true);
  http.onreadystatechange = getHttpRes;

  // Make our POST parameters string…
 var params = "prodid=" + prodid+
 "&lbox2=" + lbox2;
	
  // Set our POST header correctly…
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}

function prof() {  // This function does the AJAX request
  //  Set our destination PHP page "ajaxpost.php"…
  http.open("POST", "/ProfanityWS/Profanity.asmx/SimpleProfanityFilter", true);
  http.onreadystatechange = getHttpResemail;

  // Make our POST parameters string…
 var params = "Text=" + encodeURI(document.contactform.details.value);
	
  // Set our POST header correctly…
	http.setRequestHeader("Host", "ws.cdyne.com");
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data…
 http.send(params);
}



