
var timers = new Object();
 function set(ul, block) {
 var list = document.getElementById(ul);
 list.style.display = (block) ? "block" : "none";
 }
 function showList(ul) {
 set(ul, true);
 clearTimeout(timers[ul]);
 }
 function hideList(ul) {
 set(ul, false);
 var waiting = "set('" + ul + "', false)";
 timers[ul] = setTimeout(waiting, 500);
 }
function add2Fav(x){
 if (document.all && !window.opera) {
 if (typeof window.external == "object") {
 window.external.AddFavorite(document.location, document.title);
 return true;
 }
 else return false;

 }
 else{
 x.href=document.location;
 x.title=document.title;
 x.rel = "sidebar";
 return true;
 }
}

function showTab(id){
 for(i=1;i<6;i++){
 el = document.getElementById('tabHead'+i);
 if(el){
 el.className = (id==i ? 'tabActive' : 'tabInactive');
 }
 el = document.getElementById('tabContent'+i);
 if(el){
 el.style.display = (id==i ? 'block' : 'none');
 }
 }
 return false;
}

function ce (tagName) { return document.createElement(tagName) }

function sendQuery(url) {

 var s = ce('script');

 s.type='text/javascript';

 s.language='Javascript';

 s.src=url;

 document.documentElement.firstChild.appendChild(s);

}

function doCheck(tid){
 refreshImg = document.getElementById('refresh');
 if(refreshImg)
 refreshImg.src='http://www.vertor.com/images/but_refresh_anim.gif';
 sendQuery('http://dl.vertor.com/check_vt.php?id='+tid);
 return false;
} 

function Set_Cookie( name, value, expires, path, domain, secure )
{
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );
	
	if ( expires )
	{
	expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	
	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
	( ( path ) ? ";path=" + path : "" ) +
	( ( domain ) ? ";domain=" + domain : "" ) +
	( ( secure ) ? ";secure" : "" );

}	

