<!--

var glPrevPid		= "none";	// previouse opened row
function CloseMiniSite(Pid)
{
	var objDiv //the row that needs to be opened
	var objTopLine // the row that needs to be colored
	var objRightLine //the right part of the row that needs to be colored
	var objLeftLine //the left part of the row that needs to be colored
	//closing the mini site
	objDiv=document.getElementById("Row" + Pid)
	objDiv.innerHTML=""	

	objTopLine=document.getElementById("TopLine" + Pid)
	objTopLine.innerHTML=""
	objHR=document.getElementById("HR" + Pid )
	objHR.innerHTML=""		

	objName=document.getElementById("PrName" + Pid)
	objName.style.visibility = 'visible';
}
function LoadIframe(Pid, chCaption, topLineTxtCol, strDate, topLineDateCol)
{
	//LOAD THE LOADING SCREEN IFRAME
	if (glPrevPid != "none") CloseMiniSite(glPrevPid)
	if (glPrevPid == Pid)
	{
		glPrevPid = "none"
	}
	else
	{
		objDiv=document.getElementById("Row" + Pid )
		objDiv.innerHTML="<td><iframe marginwidth=1 frameborder=0 border=0 width=100% height=120px src=\"movie" + Pid + ".html\"></iframe></td>"
		objTopLine=document.getElementById("TopLine" + Pid)
		objTopLine.innerHTML="<A id=up></A>" + 
		"<table height=100% style = cursor:pointer" + " onclick=CloseMiniSite(" + Pid + ")" + " height=13px width=100% >" +
		"<tr height=1px>" + 
		"<td valign='middle'>" +
		"<div style='position:absolute; width:100%; height:100%; z-index:2; visibility: visible;' align='center'>" +
			"<table width=100%><tr>" +
			"<td align='center' width=50%>" +
				"<font face='Comic Sans MS' size=2 color=" + topLineTxtCol + ">" + chCaption + "</font>" +
			"</td>" +
			"<td align='center' width=40%>" +
				"<font face='Comic Sans MS' size=2 color=" + topLineDateCol + ">" + strDate + "</font>" +
			"</td>" +
			"<td width=10%>" +
			"</td>" +
			"</tr></table>" +
		"</div>" +
		"<div style='position:relative; width:100%; height:100%; z-index:1; visibility: visible;' align='center'>" +
			"<img src = '..\\images\\header.gif' height='30px'>" +
		"</div>" +
		"</td>" +
		"<td>" +
		"</td>" + 
		"</tr>" +
		"</table>"

		objHR=document.getElementById("HR" + Pid )
		objHR.innerHTML="<img src='..\\images\\under.gif'>"
		objName=document.getElementById("PrName" + Pid)
		if (objName!=null)
		{
			objName.style.visibility = 'hidden';
			objName.style.cursor = 'pointer';
		}
		glPrevPid = Pid
	}
}

function launchwin(strUrl, strName, param)
{
	// new popup with movie
	if (param == "download")
	{
		window.open(strUrl, 'download', 'height=1, width=1');
	}
	else
	{
		window.open(strUrl , strName , param);
	}
}
<!-- --------SCRIPT END-------- -->
/*
	script take care of the HTML object such as div,span and etc
	01/04/03 Shay Lapid
*/

function Div(Div1)
{
var oDiv=Div1;
var iScreenWidth=document.body.offsetWidth;
var iStartPos;
var iStartPosLeft;
var iStartPosLeftWidth;
var bSameLocation;
var iSizeStep;
var iMaxSize;

var iStartHeight

if (oDiv.nodeName=='IFRAME')
	iStartHeight=oDiv.height;
else
	iStartHeight=oDiv.offsetHeight;


this.iStartPos=iStartPos;
oDiv.iStartPos=iStartPos;
this.Print=Print;
oDiv.Print=Print;
this.ChangeState=ChangeState;
oDiv.ChangeState=ChangeState;
this.Open=StateOpen;
oDiv.Open=StateOpen;
this.Close=StateClose;
oDiv.Close=StateClose;
this.Clear=Clear;
oDiv.Clear=Clear;

oDiv.reLocate=LocateInit;
this.reLocate=LocateInit;

oDiv.ChangeSize=ChangeSizeInit;
this.ChangeSize=ChangeSizeInit;

oDiv.ChangeSizeClose=ChangeSizeCloseInit;
this.ChangeSizeClose=ChangeSizeCloseInit;

	function ChangeSizeInit(Step,MaxSize)
	{
		iSizeStep	= Step;
		iMaxSize	= MaxSize;
		clearInterval (oDiv.Interval);
		oDiv.Interval=setInterval(ChangeSize,10);
	}
	function Clear()
	{
		oDiv.innerHTML='';
	}
	function ChangeSize()
	{
		var iHeight=oDiv.offsetHeight;
		
		if(iHeight < iMaxSize)
			oDiv.style.height = iHeight + iSizeStep;
		else
			clearInterval (oDiv.Interval);
			
	}
	function ChangeSizeCloseInit(Step)
	{
		iSizeStep	= Step;
		
		clearInterval (oDiv.Interval);
		oDiv.Interval=setInterval(ChangeSizeClose,10);
	}

	function ChangeSizeClose()
	{
		var iHeight=oDiv.offsetHeight;
		if(iHeight > iStartHeight)
			oDiv.style.height = iHeight - iSizeStep;
		else
			clearInterval (oDiv.Interval);
			
	}	
	function Print(WinWidth,WinHeight)
	{
		var frm=open('','','height='+WinHeight+'; width='+WinWidth+';,left=40,Top=20');
		var sHTML = '<html dir=rtl><body>' + oDiv.innerHTML+'<'+'script>print()<'+'/script><body></html>';
		
		frm.document.writeln(sHTML);
		frm.location.reload();
		setTimeout(frm.close,200);
	}
	function StateOpen()
	{
		oDiv.style.display='';
	}
	function StateClose()
	{
		oDiv.style.display='none';
	}
	
	function ChangeState()
	{
		
		
		if(oDiv.style.display=='none')
			StateOpen();
		else
			StateClose();
		
	}
	
	function LocateInit(iY,bSamePlace)
	{
		if (!iY)	
			iStartPos=oDiv.offsetTop;	
		else	
			iStartPos=iY;
		window.onscroll=reLocate;
		/*
		window.onresize=function ()
		{
			var iDelta=document.body.offsetWidth-iScreenWidth;
			iDelta=iDelta/2;
			//alert(iStartPosLeftWidth)
			iStartPosLeftWidth=iStartPosLeftWidth-iDelta;
			//iStartPosLeftWidth-=iDelta;
			iScreenWidth=document.body.offsetWidth;
			reLocate();
		}
		*/
		bSameLocation=bSamePlace;
		
		iStartPosLeft=oDiv.offsetLeft;
		iStartPosLeftWidth	= oDiv.offsetWidth;
		reLocate ();
	}
	
	function reLocate()
	{
		var oDivStyle = oDiv.style
		var iDestPos
		if (bSameLocation)
			iDestPos = document.body.scrollTop + iStartPos;
		else if (iStartPos > document.body.scrollTop )
			iDestPos = iStartPos;
		else
			iDestPos = document.body.scrollTop;
		oDivStyle.top		= iDestPos;
		
	}
		
	if (navigator.appName.toLowerCase()=='netscape')
	{
		oDiv.insertAdjacentHTML=function(stam,str)
		{	
		var r = document.createRange();
		r.setStartBefore(document.body);
		var node = r.createContextualFragment(str);
		oDiv.appendChild(node);	
		}
		
		/**********************************/
		function allIn(sID,oCurrNode)
		{
			for(var i=0;i<oCurrNode.length;i++)
			{
				if(oCurrNode[i].id==sID)
				{
					return oCurrNode[i];
				}
				else
				{
					var returned=allIn(sID,oCurrNode[i].childNodes);
					if (returned!=null)
						return returned;
				}
			}
		}

		function allFirst(sID)
		{
			var oCurrNode=oDiv.childNodes;
			return allIn(sID,oCurrNode);
		}
		this.all=allFirst
		oDiv.all=allFirst;
		/**********************************/
	}
}
