function SubmitCurrent() 
{
window.document.path.page.value='1';
document.path.submit()
}
function ChangeAC(acid) 
{
releasePrice();
window.document.path.ac.value=acid;
window.document.path.bc.value='';
window.document.path.cc.value='';
window.document.path.bit.value='';
window.document.path.page.value='1';
document.path.submit()
}
function ChangeBC(bcid) 
{
releasePrice();
window.document.path.bc.value=bcid;
window.document.path.cc.value='';
window.document.path.bit.value='';
window.document.path.page.value='1';
document.path.submit()
}
function ChangeCC(ccid) 
{
window.document.path.cc.value=ccid;
window.document.path.page.value='1';
document.path.submit()
} 
function clearBrand() 
{
window.document.path.bit.value='';
window.document.path.page.value='1';
document.path.submit()
}
function nPage(page) 
{
window.document.path.page.value=page;
document.path.submit()
}
function oSortby(order) 
{
window.document.path.order.value=order;
window.document.path.page.value='1';
document.path.submit()
}

function doSortby(sortby) 
{
window.document.path.sortby.value=sortby;
window.document.path.page.value='1';
document.path.submit()
} 

function sSortby(sortby) 
{
window.document.path.sortby.value=sortby;
window.document.path.page.value='1';
document.path.submit()
} 

function CurrencyFormatted(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	s =  s.replace(".", ",");
	return s;
}

function getQuerystring(key, default_)
{
  if (default_==null) default_="";
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
