var GetChaturl = "/marketroot/content/marketplace/yeboss/getcategory.html";
var PostINQ = "/marketroot/content/marketplace/yeboss/submitinq.html";
//var GetChaturl = "C:\marketroot\work\marketroot\company\template\content\category.html";
//initiates the first data query
function get_category(){
	if (httpSendType.readyState == 4 || httpSendType.readyState == 0) {
		try{
			param = "cmd_company=" + document.searchform.cmd_company.value + "&id="+ document.searchform.type.value + "&searchcategory="+ document.searchform.category.value;
			httpSendType.open("POST",GetChaturl + '?id=' + document.searchform.type.value, true);
			httpSendType.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
			httpSendType.onreadystatechange = handlehhttpSendType;
			httpSendType.send(param);
		}
		catch(e){}
	}
}

//deals with the servers' reply to requesting new content
function handlehhttpSendType() {
  if (httpSendType.readyState == 4) {
    results = httpSendType.responseText //the fields are seperated by ---
    insertNewContent(results)
  }
}

//inserts the new content into the page
function insertNewContent(liText) {
	serverData.innerHTML =results
}
//initiates the XMLHttpRequest object
//as found here: http://www.webpasties.com/xmlHttpRequest
function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}


// initiates the two objects for sending and receiving data
var httpSendType = getHTTPObject();
var httpAddCart = getHTTPObject();
function addtobasket(code)
{
	document.form.action=PostINQ;
	document.form.target="_self";
	document.form.submit();
	
}
function checkall(str)
{
	
    var newstr
	if(str=="y" || str=="on")
	newstr =true;
	else
	newstr =false;
	
    for(i=0;i<document.form.elements.length;i++)
	{
	    if(document.form.elements[i].type=="checkbox"){
	    	if(document.form.elements[i].name!="chkall")
			document.form.elements[i].checked=newstr;
	    }
	}
	return false;
}
function visiblebtn(){
    document.write("<style>#progress{left:480px;padding-right:2px; font-size:8pt;z-index:100;visibility:visible}</style>");
   
}
function sentinquiry(){
	document.form.action="/marketroot/content/marketplace/sentinquiry.html"
	document.form.target="_new";
	document.form.submit();
}
function addtocart(){
    document.form.action="/marketroot/content/marketplace/basket.html"
	document.form.target="_self";
	document.form.submit();
	return false;
}
function get_random(maxNum)
{
  if (Math.random && Math.round)
  {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  }
  else
  {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

<!--
/*  You can get this script and many others
by visiting JavaScript City at: http://www.javascriptcity.com . */
pic_width=1024;   /*change to match the height of all your images */
pic_height=110;   /* change to match the width of all your images */
border_size=0;   /* change to the border size you want on the images */
alignment=1;      /* 0=left,1=center */
/* define image urls */
if (document.images)
{
pic1= new Image(pic_width,pic_height);
pic1.src="/marketroot/marketroot/company/images/banner01.gif";
pic2= new Image(pic_width,pic_height);
pic2.src="/marketroot/marketroot/company/images/banner02.gif";
pic3= new Image(pic_width,pic_height);
pic3.src="/marketroot/marketroot/company/images/banner03.gif";
pic4= new Image(pic_width,pic_height);
pic4.src="/marketroot/marketroot/company/images/banner04.gif";
pic5= new Image(pic_width,pic_height);
pic5.src="/marketroot/marketroot/company/images/banner05.gif";
}

function get_Image()
{
if (document.images)
{
var choose_one= get_random(3);
choose_one--;
var pics= new Array(3)
pics[0]=pic1.src;
pics[1]=pic2.src;
pics[2]=pic3.src;
pics[3]=pic4.src;
pics[4]=pic5.src;

document.write("<td valign=top STYLE='background-image:URL("+pics[choose_one]+");background-repeat:no-repeat; width='"+pic_width+"' height='"+pic_height+"' border='"+border_size+"''></td>");
}
}
//-->


