function CheckFrames()
{
	//alert(parent.frames.length);
	if(parent.frames.length!=5)
	{
		//parent.window.location="index.html";
	}
}



function DisClick()
{
 // Disable right click
	if (event.button==2)
	{
		event.returnValue=false;
	}
}

function DisEvent()
{
	event.returnValue=false;
}

function doClass(CellName,Type)
{
	switch (Type)
	{
		case 1 : TypeStr="Hover"; break;
		default: TypeStr=""; break;
	}
	document.all(CellName).className="MainFourTable" + TypeStr;
}

function highlightRow(CellName,Type)
{
	switch (Type)
	{
		case 1 : document.all(CellName).bgColor="#00CCCC"; break;
		default: document.all(CellName).bgColor="#99CCCC"; break;
	}

}

function ChangeHeaderTitle(TitleStr)
{
	var HeaderFrame=parent.frames("Main_Frame_Top");
	if(HeaderFrame.document.all("TableHeadTitle"))
	{
		HeaderFrame.document.all("TableHeadTitle").innerHTML=TitleStr;
		var MenuFrame=parent.frames("Right_Frame");
		if(MenuFrame.document.all("menuBody"))
		{
			   MenuFrame.document.all("menuBody").style.cursor="";
		}


 parent.document.body.style.cursor = "wait";
	}
}
function PicPopUp(ImgDir)
{
window.open("PicPopUp.php?ImgUrl="+ImgDir,"PicPopup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=0");
}

function scrollUp()
{
	window.scrollTo(0,0);
}

function OpenSite()
{
	var Siteopen=window.open("frame_index.htm","Rotem_Site","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=0,height="+eval(screen.availHeight-32)+",width="+eval(screen.availWidth-12));
	Siteopen.focus();
}

function PrintDis(BeforeAfter)
{
	if(BeforeAfter==0)
	{
		for(i=1;i<=3;i++)
		{
			document.all("prnTR_"+i).style.display="";
		}
		document.all("MainSiteTable").style.height="0%";
		document.all("prnTitle").innerHTML=top.parent.frames["Main_Frame_Top"].document.all("TableHeadTitle").innerText + "<br><br>";
	}
	else
	{
		for(i=1;i<=3;i++)
		{
			document.all("prnTR_"+i).style.display="none";
		}
		document.all("MainSiteTable").style.height="100%";
		document.all("prnTitle").innerText="";
	}
}

	function ShowHideLinks(ItemNum)
	{
		var LinksTable=document.all("LinksTable");
		var LinkRows=LinksTable.rows;
		var LinkCells=LinksTable.cells;
		//alert(LinkRows.length);

		var dispSign=document.all("LinksTd_"+ItemNum).style.display;

		if (dispSign=="none")
		{
			for(i=0;i<LinkCells.length;i++)
			{
				if (LinkCells[i].id!="")
				{
					if (LinkCells[i].id!="SignTd_"+ItemNum) LinkCells[i].innerHTML="+";
				}
			}

			for(i=0;i<LinkRows.length;i++)
			{
				if (LinkRows[i].id!="")
				{
					if (LinkCells[i].id!="LinksTd_"+ItemNum) LinkRows[i].style.display="none";
				}
			}

			document.all("LinksTd_"+ItemNum).style.display="";
			document.all("SignTd_"+ItemNum).innerHTML="&nbsp;-";

		}
		else
		{
			document.all("LinksTd_"+ItemNum).style.display="none";
			document.all("SignTd_"+ItemNum).innerHTML="+";
		}



	}


function PrintMainWin()
{
	top.parent.frames["Main_Frame"].focus();
	top.parent.frames["Main_Frame"].print();
}

