function fContact(iIndex) {
	oMsg=aMsgs[iIndex];
	contactWindow=null;
	contactWindow=window.open("","hContact","toolbar=no,status=yes,scrollbars=yes,width=280,height=120,top=100,left=200,resizable=1");
	contactWindow.document.close();
	contactWindow.document.open();
	contactWindow.document.write('<html>\n<head>\n<title>היהודים - האתר הרשמי</title>\n<style>\n.font2,a {\n	color:white; font-family:arial; font-size:12px;\n}\n</style>\n<meta http-equiv=Content-Type content="text/html; charset=windows-1255" />\n</head>\n<body style="direction:rtl; margin:10; background-color:#000000;">\n<span style="color:#FFFFFF; font:bold 14px arial;">יצירת קשר עם '+oMsg.user+':</span><br />\n<span class=font2>');
	oMsg.email ? contactWindow.document.write('<b>דואר</b>: <a href="mailto:'+oMsg.email.replace("^","@")+'">'+oMsg.email.replace("^","@")+'</a><br />\n') : '';
	(oMsg.icq*1) ? contactWindow.document.write("<b>ICQ</b>: <img src=\"http://online.mirabilis.com/scripts/online.dll?icq="+oMsg.icq+"&img=5\" border=0 width=18 height=18 align=absmiddle /> <span style=\"text-decoration:underline; cursor:hand;\" onclick=\"window.opener.fCopy("+oMsg.icq+")\">העתק מספר</span> <a target=_top href=\"http://wwp.mirabilis.com/scripts/Search.dll?to="+oMsg.icq+"\" title=\"הוספה לרשימה\">הוספה לרשימה</a> <a href=\"http://web.icq.com/whitepages/message_me/1,,,00.icq?uin="+oMsg.icq+"&action=message\" title=\"שלח הודעה מיידית לICQ\">הודעה מיידית</a><br />") : '';
	contactWindow.document.write('<br /></span>\n<input type=button style="background-color:#3F3F3F; color:#FFFFFF; font:bold 12px arial; cursor:hand;" onclick="window.close()" value="סגור חלון">\n</span>\n</body>\n</html>');
	contactWindow.focus();
}

function fAttachment(sFileName,sExtention) {
	if (sExtention=="bmp"||sExtention=="jpg"||sExtention=="gif"||sExtention=="png"||sExtention=="tif") {
		picWindow=null;
		picWindow=window.open("","hImage","toolbar=no,status=no,scrollbars=yes,width=300,height=400,top=0,left=0,resizable=1");
		picWindow.document.close();
		picWindow.document.open();
		picWindow.document.write('<html>\n<head>\n<title>היהודים - האתר הרשמי</title>\n<meta http-equiv=Content-Type content="text/html; charset=windows-1255" />\n</head>\n<body style="direction:rtl; margin:10; background-color:black;">\n<span style="color:#FFFFFF; font:bold 14px arial;">תמונה מצורפת לפורום:<br />\n<table border=0 cellspacing=0 cellpadding=0><tr><td align=center><img src="'+sFileName.replace("http://forum.hayehudim.com/resize.php?image=","")+'" style="border:solid 1 #3F3F3F; margin-top:10px; margin-bottom:10px;" /><br />\n<input type=button style="background-color:#3F3F3F; color:#FFFFFF; font:bold 12px arial; cursor:hand;" onclick="window.close()" value="סגור חלון"></td></tr></table>\n</span>\n</body>\n</html>');
		picture=new Image()
		picture.src=sFileName.replace("http://forum.hayehudim.com/resize.php?image=","");
		picWidth=(picture.width<750) ? picture.width+50 : 780;
		picHeight=(picture.height<401) ? picture.height+115 : 550;
		picWindow.resizeTo(picWidth,picHeight);
		picWindow.focus();
	} else {
		window.open(sFileName.replace("http://forum.hayehudim.com/resize.php?image=",""), "hAttachment", "toolbar=yes,status=yes,scrollbars=yes,width=600,height=500,top=0,left=0,resizable=1")
	}
}

function fLink(sURL) {
	(sURL.indexOf("hayehudim.com")>0) ? document.location=sURL : window.open(sURL);
}

function fMailTo(sMail) {
	document.location="mailto:"+sMail.replace("^","@");
}

function fCopy(sText) {
	oText.innerText=sText,
	objCopy=oText.createTextRange();
	objCopy.execCommand("Copy");
}

function fOpenNavigation(iTotalPages,iCurrentPage) {
	navigationWindow=window.open("navigation.php?iTotalPages="+iTotalPages+"&iCurrentPage="+iCurrentPage,"hNavigation","toolbar=no,status=yes,scrollbars=yes,width=180,height=90,top=100,left=200,resizable=1");
	navigationWindow.focus();
}