function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function makeHomePage(){
	title = "Shlager.net";
	url = "http://www.shlager.net";
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
		}
	else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
		}
	else if(window.opera && window.print) { // Opera Hotlist
		return true; 
		}
	}	
function expandComments_v2(commentID){
	var commentText=document.getElementById('commentText_'+commentID);
	var commentDiv=document.getElementById('commentDiv_'+commentID);
	var isOpen=commentText.style.display==''?true:false;
	commentDiv.style.borderTop=isOpen?'':'1px solid #CCCCCC';
	commentDiv.style.borderBottom=isOpen?'':'1px solid #CCCCCC';
	commentDiv.style.backgroundColor=isOpen?'':'#F8F8F8';
	commentText.style.display=isOpen?'none':'';
	//document.getElementById('commentDiv_'+commentID).style.backgroundColor=isOpen?'':'white';
	//document.getElementById('commentDiv_'+commentID).style.borderColor=isOpen?'#ECECEC':'#CCCCCC';
	}
function expandComments(commentID){
	var commentText=document.getElementById('commentText_'+commentID);
	var isOpen=commentText.style.display==''?true:false;
	commentText.style.display=isOpen?'none':'';
	document.getElementById('commentDiv_'+commentID).style.backgroundColor=isOpen?'':'white';
	document.getElementById('commentDiv_'+commentID).style.borderColor=isOpen?'#ECECEC':'#CCCCCC';
	}
var allCommentsOpened=false;
function expandAllComments(v2){
	if(!allComments){return false;}
	var allCommentsSp=allComments.split(';');
	for(var i=0; i<allCommentsSp.length-1; i++){v2? expandComments_v2(allCommentsSp[i]) : expandComments(allCommentsSp[i]);};
	allCommentsOpened=allCommentsOpened==true?false:true;
	document.getElementById('openAllTeguvot').innerHTML=allCommentsOpened ? '&#1492;&#1505;&#1514;&#1512; &#1499;&#1500; &#1492;&#1514;&#1490;&#1493;&#1489;&#1493;&#1514;' : '&#1508;&#1514;&#1495; &#1499;&#1500; &#1492;&#1514;&#1490;&#1493;&#1489;&#1493;&#1514;'
	}
function addComment(commentLink){
	document.getElementById('commentAddIframe').src=commentLink;
	document.getElementById('commentAddDiv').style.display='';
	}
var httpResponse;
function sendPage(pg, frmVals) {
	try{
		var http=document.all ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
		if(!frmVals||document.all) {http.open("GET", pg+(!frmVals?'':'&'+frmVals), false); http.send(null);}
		else {
			http.open("POST", pg, false);
			http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
			http.send(frmVals);
			}
		if (http.status == 200) {httpResponse=http.responseText; return true;}
			else{
				var regexp = /<li>Error Type:<br>\r\n(.*)<br>\r\n<\/li>/;
				var match = regexp.exec(http.responseText);
				if (match != null) {alert( 'Error:\n\n'+ (match[1].replace(/<br?\/?>/g, '\n').replace(/<?\/b?\/?>/g, '')) )}
					else{alert('Error in page!')}
				return false;
				}
		}
	catch(e){alert('Javascript error!'); return false;}
	}
function getOffset(el,offset){return el[offset]+(el.offsetParent?getOffset(el.offsetParent,offset):0);}
