﻿var details = new Array();

	var _current = null; //current opened object
	var _id = 0;

	function showCat(id,featured){
		myUrl = 'http://' + document.location.hostname + '/index.php?a=ajax&action=getCategory&b=';
		myUrl += id;
		if (!_id){
			_id = first_cat;
		}
				
			//expand it
			if (details['_'+id+'_']){
				refreshAd($('link_'+id).innerHTML);
				$('cat_content').innerHTML = details['_'+id+'_'];
				$('cat_'+_id).className='cat_box';
				$('cat_'+id).className='cat_box_current';
				_id = id;
			}else{
				ajax = new Ajax(myUrl,{method:'get',update: $('cat_content'),onComplete: function(){
						refreshAd($('link_'+id).innerHTML);
						$('cat_'+_id).className='cat_box';
						$('cat_'+id).className='cat_box_current';
						_id = id;
						
					}
					});
					ajax.request();
				}
	}	

 function refreshAd(txt) {
      var currentTime = new Date();
}