function popUp(pageurl,width,height,resize,scroll,loc){
	day = new Date();
	id = day.getTime();if(typeof loc=="undefined")loc=1;
	if (window.screen) {  
		lpos = (screen.width/2)-(width/2);  
		hpos = (screen.height/3)-(height/3);
	}else	{
		lpos = 1;
		hpos = 1;		
	}		 		
	eval("popWin"+id+" = window.open('"+pageurl+"','"+id+"','toolbar=0,scrollbars="+scroll+",location="+loc+",status=0,menubar=0,resizable="+resize+",width="+width+",height="+height+",left="+lpos+",top="+hpos+"')");
}

function showhideDuruus(visibleID){
  $('.left_articles table.zebra').hide();
  $(visibleID).show();
  $(visibleID+"_button").show().get(0).scrollIntoView();
}

function showhide(id) {
//alert($(id).style.display)
  $('#'+id).toggle()
 }
function trim(s) {
  return s.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  //return(this.replace(/^\s*|\s*$/g, ""));
};
function stripHTML(s) {
  return trim(s.replace(/<.*?>/g, '')).replace(/\r|\n|\r\n/g, "").replace("&nbsp;","");
};
function attachOnclicks() {

}
function attachEvent(links) {
return;
  for(i=0, size=links.length; i < size; i++){
    a = links[i];
	//if(!a.href) continue;
    l = a.href.toLowerCase();

    if(l.indexOf(".ram")!==-1  ||l.indexOf(".rm")!==-1  ||l.indexOf(".ra")!==-1|| l.indexOf(".mp3")!==-1 || l.indexOf(".wmx")!==-1){
//      a.href="javascript:popUp('/player.php?url='+a.href+'&title='+escape(stripHTML(a.innerHTML)), 520, 355, 1, 0, 0);";
      a.onclick=function(evt){
        popUp('/player.php?url='+this.href+'&title='+escape(stripHTML(this.innerHTML)), 520, 355, 1, 0, 0);
		 this.href="#";
		 evt.cancel=true;
		 evt.returnValue=false;
		 evt.cancelBubble=true;
		 if (evt.stopPropagation) evt.stopPropagation();
		 if (evt.preventDefault) evt.preventDefault();
		return false;
      }
    }
  }
}

window.onload=function(){
return;
  left   = document.getElementsByTagName("a");
  rite   = $('jambigaMidig').getElementsByTagName("a");
  attachEvent(left);
  attachEvent(rite);

  if($("QoraalContainer"))
	attachEvent($("QoraalContainer").getElementsByTagName("a"));

}
