function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}

function bookmark(a){
 var url = window.document.location;
 var title = window.document.title;
 var b = getBrowserInfo();
 if (b.type == 'IE' && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = url+','+title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}

function to_basket(id){	window.open('/buy-dvd-'+id+'.html','id','top=200, left=200, menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, width=400, height=300');
}

function del_from_basket(id){
	window.open('/del-dvd-'+id+'.html','id','top=200, left=200, menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, width=400, height=300');
}

function goCart() {	window.open('/cart.html');
}

function goOrder() {	window.open('/order.html');
}



var popenetrator_fullurl = 'http://ads.pornokino.ru/go.php';

function popenetrator(objLink){
	try{
		if(popenetrator_fullurl==undefined){
			popenetrator_fullurl = false;
		}
	}catch(e){
		popenetrator_fullurl = false;
	}

	if(navigator.userAgent != null && navigator.userAgent.indexOf( "Firefox/" ) != -1   && navigator.userAgent.indexOf( "Firefox/1" ) == -1){
	//Firefox2 (open popup in tabs)
		var nnwin = window.open(objLink.href,'mywin' + Math.random(1000));
		if(popenetrator_fullurl){
			objLink.href = popenetrator_fullurl;
			document.location = popenetrator_fullurl;
			document.focus();
		}else{
			objLink.href = popenetrator_fullurl + '?noUnder=true';
			document.location = popenetrator_fullurl + '?noUnder=true';
			document.focus();
		}
		return false;
	}else{
		var nnwin = window.open(popenetrator_fullurl,'mywin' + Math.round(Math.random(1000)*1000));
		nnwin.blur();
		document.location = objLink.href;
		document.focus();
	}

}

