
// <script type="text/javascript">
//	fWriteFlashObject(nID, sUrl, nWidth, nHeight, sBG, bTransparent, sCssClass)

// </script>


function fWriteFlashObject(sID, sUrl, nWidth, nHeight, sBG, bTransparent, sCssClass){
	document.write('<object id="'+ sID +'" width="'+ nWidth +'" height="'+ nHeight +'" class="'+ sCssClass +'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">')
	document.write('<param name="movie" value="'+ sUrl +'">')
	if(bTransparent) document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="'+ sBG +'" />');
	document.write('<param name="quality" value="high">');
	document.write('<embed id="'+ sID +'" src="'+ sUrl +'" width="'+ nWidth +'" height="'+ nHeight +'" class="'+ sCssClass +'" bgcolor="'+ sBG +'" '+ (bTransparent ? 'wmode="transparent"' : '') +' quality="high"  TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></embed>')
	document.write('</object>');
}


// THIS FUNCTION GENERATES FAKE <A HREF="MAILTO:..."> TAG
function fPrintEmailLink(sUserName, sDomain, linkText, linkTitle, cssClass, sSubject, sBody){
	var sQS=""
	if(!sUserName || !sDomain) return false;
	var sLinkText=linkText||null, sLinkTitle=linkTitle||null, sCssClass=cssClass||null;
	if(!sLinkText) sLinkText=sUserName +"@"+ sDomain;

	if(sSubject || sBody) sQS+="?";
	if(sSubject) sQS+="subject="+ sSubject;
	if(sSubject && sBody) sQS+="&";
	if(sBody) sQS+="body="+ sBody;

	if(sLinkTitle) sLinkTitle=" title='"+ sLinkTitle +"'"
	if(sCssClass) sCssClass=" class='"+ sCssClass +"'"

	document.write("<a "+ sLinkTitle +" "+ sCssClass +" href='m&#97;ilto:"+ sUserName +"&#64;"+ sDomain + sQS +"'>"+ sLinkText +"</a>")
}

function fChangeDisplay(sObjName){
	var obj=document.getElementById(sObjName);
	obj.style.display=(obj.style.display=="block" ? "none" : "block");
}


function fPopupLayer(sURL, nWidth, nHeight){
	var obj=document.getElementById("oPopupLayerFrame");

	nWidth=(nWidth||540);
	nHeight=(nHeight||400);
	var nLeft=(document.body.offsetWidth-nWidth)/2 +"px";
	var nTop=(document.documentElement.clientHeight-nHeight)/2 + document.documentElement.scrollTop +"px";
	obj.style.width=nWidth;
	obj.style.height=nHeight;
	obj.style.left=nLeft;
	obj.style.top=nTop;
	obj.innerHTML="<iframe src=\""+ sURL +"\" style=\"width:"+ nWidth +"px; height:"+ nHeight +"px;\" frameborder=\"0\"></iframe>"
	obj.style.display="block";


	document.getElementById("oPopupLayer").style.height=document.body.offsetHeight;
	document.getElementById("oPopupLayer").style.display="block";
}

function fClosePopupLayer(sURL, nWidth, nHeight){
	document.getElementById("oPopupLayerFrame").style.display="none";
	document.getElementById("oPopupLayer").style.display="none";
}

function PopUp(url, width, height){
	window.open(url,null,"width="+(width||500)+", height="+(height||300)+", scrollbars=yes, resizable=no")
}

function fPopupImage(url){
	if(url) window.open("imgPopUp.asp?url="+ url,"winPopupImage","width=5,height=5")
}

function fSendToFriend(){
	window.open("/Send2Friend.asp?title="+ document.title, "winSendToFriend", "width=400,height=380");
}

function fPrintPage(){
	window.open('/print.html', 'winPrint', 'width=790, height=400, scrollbars=yes');
}

function fLogin(){
	alert("זו הפונקציה\n fLogin \nשאלי צריך לממש")
}