function show_tab(p,q,h) {

for(i=1;i<=h;i++) {
	if(i==q) {
		document.getElementById('tab_' + p + '_' + i).style.display = 'block';
		document.getElementById('td_' + p + '_' + i).className = 'TabClass1';
		if(p==1) {
			document.getElementById('tabCenter_' + p + '_' + i).style.display = 'block';
		}
	}
	else {
		document.getElementById('tab_' + p + '_' + i).style.display = 'none';
		document.getElementById('td_' + p + '_' + i).className = 'TabClass2';
		if(p==1) {
			document.getElementById('tabCenter_' + p + '_' + i).style.display = 'none';
		}
	}
}

}

function addbookmark(){
if (document.all) {
	var bookmarkurl=document.location
	var bookmarktitle=document.title
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
}

function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	window.top.location.href = gourl;
}

function selecturl_map(s,q,cat) {
  var gourl = s.options[s.selectedIndex].value;
  var cat_link = '';
  
    if(q==1) {
      if(cat>0) cat_link = '&id=' + cat;
      else cat_link = '';
      self.location.href = 'index.php?module=map&act=places&city=' + gourl + cat_link;
    }
    else if(gourl!=0) self.location.href = 'index.php?module=map&act=map,' + gourl;

}




function Cookie(id) {
 var cookieName = "cat" + id;
 var cookieValue;

 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") cookieValue = ""; 
 else {
  var ind1=theCookie.indexOf(';',ind);
  if (ind1==-1) ind1=theCookie.length; 
  cookieValue = unescape(theCookie.substring(ind+cookieName.length+1,ind1));
 }
 
 if(cookieValue==1) cookieValue = 0;
 else cookieValue = 1;
 
 var today = new Date();
 var expire = new Date();
 expire.setTime(today.getTime() + 3600000*3);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();


}

