function support_popup(){
	winopen("http://chat.cartadmin.com/request.php?l=admin&x=1&deptid=&page=http://cheaptramadolforsale.com/", "");
	return false;
}

openCat = 0;
function expandCat(catID){
	if(catID != openCat){
		if(openCat)
			$('#cat' + openCat).hide('_default')
		$('#cat' + catID).toggle('_default')
		openCat = catID
	}else{
		$('#cat' + catID).hide('_default')
		openCat = 0
	}
	return false
}

function goProd(prodID,catID){
	newWin = window.open("/buy_cheap_" + prodID + "/" + catID + "_drug_online/","_self")
	return false
}
function goCat(catID){
	newWin = window.open("/cheap_" + catID + "_drugs/","_self")
	return false
}

function checkout(prodID){
	newWin = window.open("/checkout/?prodID=" + prodID,"_blank")
	newWin.focus()
	return false
}

function checkoutFromSelect(selNo){
	prodID = document.getElementById('no_'+selNo).value
	return checkout(prodID)
}

function newWin(url, name, w, h){
	l = (screen.availWidth-10 - w) / 2;
	t = (screen.availHeight-20 - h) / 2;

	features = "width="+w+",height="+h+",left="+l+",top="+t;
	features += ",screenX="+l+",screenY="+t;
	features += ",scrollbars=1,resizable=1,location=0";
	features += ",menubar=0,toolbar=0,status=0";

	nw = window.open(url, name, features);
	if(nw)
	  nw.focus();
	return nw;
}

function winOpen(url,title){
	newWin(url,null,350,350);
}

function support_popup(servername){
	winOpen("http://chat.cartadmin.com/request.php?l=admin&x=1&deptid=&page=http://"+servername+"/", "")
	return false
}

function expand(id){
	var container = document.getElementById('prodinfo');
	var switcher = document.getElementById('toggle_info');
	var showInfo = 'more product info &raquo;';
	var hideInfo = '« hide info';
	if($('#prodinfo').attr('loaded')){
		$('#prodinfo').toggle('slow');
		switcher.innerHTML = (switcher.innerHTML == hideInfo ? showInfo : hideInfo);
	}else{
		switcher.innerHTML = hideInfo;
		$('#prodinfo').attr('loaded', true).append('<img src="/images/load.gif" alt="" class="load" />').
			load('/prodinfo/' + id + '.php');
	}
}

function addThis(){
	document.write('<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4af9acff43ee977b" rel="nofollow">' +
				   '<img src="http://s7.addthis.com/static/btn/v2/lg-bookmark-en.gif" alt="Bookmark and Share" /></a>')
	document.write('<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4af9acff43ee977b"></script>')
}

function counter(){
	document.write('<a href="http://www.liveinternet.ru/click" target="_blank" id="LI" rel="nofollow"><img'+
	' src="http://counter.yadro.ru/hit?t39.01;r'+escape(document.referrer)+((typeof(screen)=="undefined")?"":
	";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
	";"+Math.random()+'" alt="" /><\/a>')
}

function goMax(prodID){
	document.getElementById('goMax').innerHTML = '<form action="http://www.max-pharmacy.com/cart/add/" name="goMaxx" ' +
	'method="post"><input type="hidden" name="add_to_cart" value="' + prodID + '" /></form>'
	document.goMaxx.submit();
	return false
}

