function getXmlHttpRequestObjectNew() {
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	} else if(window.ActiveXObject) {
		return new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		alert("Your Browser Sucks!\nIt's about time to upgrade don't you think?");
	}
}
var PTH	=	'/'

var newList = getXmlHttpRequestObjectNew();
///

function showdop(catid,mid,pids,pg){
//	sort_ord	=	document.getElementById("sort_ord").value
//	limit	=	document.getElementById("rpp").value	
sort_ord	=	document.dopt.sort_ord.value
limit		=	document.dopt.rpp.value
pgtype		=	document.dopt.PGTYPE.value
Brid		=	document.dopt.Brid.value
	str	=	'?pg='+pg+'&pids='+pids+'&sort_ord='+sort_ord+'&limit='+limit+'&pgtype='+pgtype+'&Brid='+Brid;

   if(parseInt(catid) > 0){
	   str+='&catid='+catid
   }
   if(parseInt(mid) > 0){
	   str+='&mid='+mid
   }   
   var ss = document.getElementById('ListingDiv')
   ss.innerHTML = '<p align="center"><br>Loading Products List...<br><img src="preload/bigload.gif"></p>'; 
   document.getElementById("url").value= window.location.protocol + '//' + window.location.hostname+'/doptions.php' + str
   newList.open("GET", window.location.protocol + '//' + window.location.hostname+'/doptions.php' + str, true);			
   newList.onreadystatechange = showdo; 
   newList.send(null);   
}

function showdo(){
	if (newList.readyState == 4) {
		var ss = document.getElementById('ListingDiv')
		ss.innerHTML = '';
		ss.innerHTML=newList.responseText
	}		
}

function setOpt(){
	catid	=	document.getElementById("catiid").value
	mid		=	document.getElementById("maniid").value
	pids	=	document.getElementById("pids_").value
	pg		=	document.getElementById("pgid").value
	showdop(catid,mid,pids,pg)
}