//var tstart = (new Date()).getTime()+1;

//function done_loading() {
 //var u = '' + self.location;
 //var t = (((new Date()).getTime() - tstart) / 1000);
 //u = u.replace('http://','');
 //u = u.replace('www.','');
 //u = u.replace('tourfinder.ru','');
 //u = u.replace('tourfinder2.ru','');
 //if ( u != '/' AND u != '/index.html' ) return;
 //alert(u);
 //(new Image()).src = '/timer.html?u=' + u + '&t=' + t;
//}

//document.getElementsByTagName('BODY').onload = new function() {done_loading();};

function favadd(id) {
  var left = (screen.width - 500) / 2;
  var top = (screen.height - 350) / 2;
  window.open('/myfavorite/add.html?id='+id, 'favadd', 'scrollbars=0,resizable=no,width=500,height=350,left='+left+',top='+top+',status=1,menubar=0');
}

// open photo
function op(id) {
  var ret = true;
  left = (screen.width - 670 ) / 2;
  top = (screen.height - 550) / 2;
  //w = window.open("/photos/viewp_"+id+".html", "", 'scrollbars=1,resizable=yes,width=670,height=550,left='+left+',top='+top+',status=1,menubar=0');
  typeof(w) == "undefined" ? ret = true : ret = false;
  
  return ret
}

// confirm dialog
function cf(text) {
  var ret = false;
  ret = confirm(text);
  return ret;
}

function openpromo() {
  window.open("/static/publicite/promotion.html", "promo", 'scrollbars=0,resizable=no,width=700,height=500,status=1,menubar=0');
}