function cl_reply(comment_id, commenter_name) {
	document.getElementById('comment_parent').value=comment_id;
	document.getElementById('comment_title').innerHTML='<strong style="font-weight:normal;background:#ff6">מענה להודעה מאת '+commenter_name+'</strong> <span>&nbsp; (<a href="#comments" onclick="cl_reply_cancel()">ביטול</a>)</span>';
}
function cl_reply_cancel() {
	document.getElementById('comment_parent').value='0';
	document.getElementById('comment_title').innerHTML='השארת תגובה';
}


// highlight menu item
function highlight_module(menu_item) {
	var menu_items = document.getElementById('header').getElementsByTagName('a');
	for (var i = 0; i < menu_items.length; i++) {
		if (i==(menu_item-1)) {
			menu_items[i].className = 'active';
			break;
		}
	}
}

function trim(str) {
  var newstr;
  newstr = str.replace(/^\s*/, "").replace(/\s*$/, ""); 
  newstr = newstr.replace(/\s{2,}/, " "); 
  return newstr;
}


function MP3Player(mp3file) {
	var playerID = Math.floor(Math.random()*1001);
	document.write('<div style="margin:10px 0 20px; border-top:1px solid #999; border-right:1px solid #999; width:75px; height:25px"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="75" height="25" id="'+playerID+'"><param name="movie" value="'+jsPath+'/mp3player.swf?file='+mp3file+'"><embed src="'+jsPath+'/mp3player.swf?file='+mp3file+'" bgcolor="#0056ab"  width="75" height="25" name="'+playerID+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div>');
}

