function show_tab(q,h) {

for(i=1;i<=h;i++) {
	if(i==q) {
		document.getElementById('tab_' + i).style.display = 'block';
		document.getElementById('tb_' + i + '_0').style.display = 'none';
		document.getElementById('tb_' + i + '_1').style.display = 'block';
	}
	else {
		document.getElementById('tab_' + i).style.display = 'none';
		document.getElementById('tb_' + i + '_0').style.display = 'block';
		document.getElementById('tb_' + i + '_1').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) {
  var gourl = s.options[s.selectedIndex].value;
  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();


}

function ShowArticle(p,q) {
  
    for (i=1; i<=q; i++) {
      if(i == p) document.getElementById('newstop_' + i).style.display = 'block';
      else document.getElementById('newstop_' + i).style.display = 'none';
    }
  
}
