/*****************************   anDeRan   ************************************/
/*
var is_ie  = !!document.uniqueID;
var is_ie6 = is_ie && navigator.appVersion.match(/MSIE (5.5|6)/);

if (is_ie6) {
	try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}
}

var initNav = function () {
	var nav = document.getElementById('nav');
	if (nav) {
		nav.style.marginTop = -(nav.offsetHeight / 2) + 'px';
		nav.style.visibility = 'visible';
	}
};

window.onload = function () {
	initNav();

	try {
		Scroller.setAll();
		initLightbox();
	} catch (e) { }
};
*/

/*****************************   anDeRan   ************************************/

var is_ie  = !!document.uniqueID;
var is_ie6 = is_ie && navigator.appVersion.match(/MSIE (5.5|6)/);

var preloadImgs = function () {
	var i = arguments.length;
	while (i-- > 0) {
		(new Image()).src = '/images/' + arguments[i];
	}
};
/*
window.onload = function () {
//	preloadImgs('menu/video_on.gif', 'menu/categories_on.gif', 'menu/publish_on.gif', 'menu/quikpod_on.gif', 'menu/home_on.gif');
};
*/




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 "";
}

   var bookmarkurl="http://www.corvin.od.ua/"
   var bookmarktitle="Ресторан, паб, виски-клуб «Corvin»";
   
   function addbookmark(){
       if (window.external) { 
	   window.external.AddFavorite(bookmarkurl,bookmarktitle); 
	   }
	   else { 
	      alert("Sorry! Your browser doesn't support this function."); 
	   }
   }
   
   
   
   
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' && 7 > b.version && 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;
}

   

 
   
    

