shq.showtime=function(date)
{
    if(date==undefined){date=new Date()}
	var d=new Date(date);
	var m={1:'Jan',2:'Feb',3:'Mar',4:'Apr',5:'May',6:'Jun',7:'Jul',8:'Aug',9:'Sept',10:'Oct',11:'Nov',12:'Dec'}
	var dd={1:'1st',2:'2nd',3:'3rd',4:'4th',5:'5th',6:'6th',7:'7th',8:'8th',9:'9th',10:'10th',11:'11th', 12:'12th',13:'13th',14:'14th',15:'15th',16:'16th',17:'17th',18:'18th',19:'19th',20:'20th', 
21:'21st',22:'22nd',23:'23rd',24:'24th',25:'25th',26:'26th',27:'27th',28:'28th',29:'29th',30:'30th',31:'31st'}
	return (m[d.getMonth()+1])+'. '+dd[d.getDate()]+','+d.getFullYear();
	
}
shq.AddFavorite=function()
{
 var tmp;
    if(shq.isIE){
	 tmp="<a href='javascript:window.external.AddFavorite(location.href,document.title)' style='color:#883'>AddFavorite</a>";
	}else if(shq.isFirefox)
	{
	 tmp="<a href='javascript:window.sidebar.addPanel(document.title,location.href,\"\")'>AddFavorite</a>";
	}else if(shq.isOpera)
	{
      tmp="<a href='"+location.href+"' title='"+document.title+"' ref='sidebar'>AddFavorite</a>";
	}else
	{
	  tmp="AddFavorite";
	}
	return tmp;
}
shq.gstr=function(sSource,iLen)
{
  var el="...",hzlen;
  var re=new RegExp("^(.{"+(iLen)+"}).*$","i")
try{hzlen=sSource.replace(re,"$1").match(/[^\x00-\xff]/g).length}catch(e){hzlen=0;}
  if(sSource.length+hzlen<=iLen)return sSource; 
  re.compile("^(.{"+(iLen-Math.ceil(hzlen/2))+"}).*$","i")
return  sSource.replace(re,"$1").slice(0,iLen-3)+el;
}
shq.getxy=function(obj)
{
	 var   abs={left:0,top:0}   
  while(obj!=document.body){   
  abs.left+=obj.offsetLeft;   
  abs.top+=obj.offsetTop;   
  obj=obj.offsetParent;   
  }
  return   abs;
}


shq.CleanDefaultValue=function(e)
{
 var e=window.event?window.event.srcElement:e.target;
 if(e.value==e.defaultValue)
	{
	 var tmp='background:white; color:black;'
	 e.style.cssText=tmp;
	 if(shq.isOpera){e.setAttribute('style',tmp)}
	 e.value=shq.form_tmp_values[e.getAttribute('name')]||'';
	}
}

shq.WriteDefaultValue=function()
{    var tmp='background:#ef0; color:red;';
	if(shq.isOpera){this.setAttribute('style',tmp);}else{this.style.cssText=tmp;}
	   shq.form_tmp_values[this.getAttribute('name')]=(this.value==this.defaultValue)?'':this.value;
	   this.value=this.defaultValue;

}
shq.echo=function(s){document.write(s)}

shq.AddLoadImg=function(ImgPath)
{
  shq.loadimgs=shq.loadimgs.concat(ImgPath)
}