function OpenContactForm()
	{window.open("ContactForm.htm","ContactForm","scrollbars=NO,left=100,top=100,height=450,width=600");
	 return;}

function ShowPictureL(strUrl)
{
	window.open(strUrl,"LargePicture","status,left=0,top=0,height=250,width=300");
	return;}

function OpenTellAfriend()
	{window.open("TellAfriend.cfm","TellAfriend","left=100,top=100,height=300,width=350");
	 return;}

/**/
function OpenSmartForum()
	{window.open("SmartForum/index.cfm","SmartForum","left=100,top=100,height=800,width=600");
	 return;}

/**/

/**/
	 	 
//
function ViewLetter(FullFileName)
	{
	//alert(FullFileName);
	window.open("OriginalPicture.cfm?FullFileName=" + FullFileName,"OriginalPicture","status=0,left=1,top=1,height=520,width=620");
	 return;}
//	

function OpenOriginalPicture(FullFileName)
	{window.open("../../OriginalPicture.cfm?FullFileName=" + FullFileName,"OriginalPicture","status=0,left=1,top=1,height=340,width=430");
	 return;}
//	 
function OpenSmartWin(strUrl)
{
	//alert(strUrl);
	window.open(strUrl,"SmartWindow","status,left=100,top=30,height=400,width=600");
}

function OpenFilezManager(strURL)
	{
		window.open(strURL,"FilesManager","status,left=200,top=30,height=600,width=800");
	 return;
	 }
 
function OpenLargePic(strUrl)
{
	alert(strUrl)
	window.open(strUrl,"PictureWindow","left=10,top=10,height=300,width=440")
} 

function ShowPreview(strPreview)
		{
			strImage = '<a href=JavaScript:OpenOriginalPicture("' + strPreview + '");><img src=' + strPreview + ' border=0 alt=" Click to open large photo "></a>'
			//alert(strImage);
			parent.leftFrame.document.getElementById("PreviewDiv").innerHTML = strImage;
		}

function ShowDescription(strDescription,objAction,strActionName)
		{
		//alert(objAction)
		if (strDescription!=null)
		{
			document.getElementById("DescriptionDiv").innerHTML=strDescription;
		}
		
		if (strActionName != null)
		{
			//parent.leftFrame.location = 'left.cfm?action=' + strActionName + '&adminMode=#AdminMode#';
		
			var links=genLinks(objAction,strActionName);
		
			//alert(document.getElementById("zDiv"));
			if (document.getElementById("zDiv") != null)
			{
				document.getElementById("zDiv").innerHTML=links;
			}
		}
		//parent.leftFrame.document.getElementById("links").innerHTML ='';
		//parent.leftFrame.document.getElementById("zTable").innerHTML = links;
		//parent.leftFrame.document.getElementById("zDiv").innerHTML=links;
		}
		
//	Displays the 0 level Categories for a SECTION	
	function genLinks(objLink,strActionName)
	{
		//alert(objLink);
		
		var linksArray = objLink.split("|");
		
		var strLink,objArray;
		strLink='<table height="15" align="center" border="0" cellspacing="0" cellpadding="0" id="zTable" dir="rtl" lang="he" class="Top_SubLinks"><tr><TD height="15" width="50"><IMG src="images/spacer.gif" width="1" height="15" hspace="0" vspace="0" border="0" alt=""></td>';
		
		for (var i = 1;i<linksArray.length;i++)
		{
			objArray = linksArray[i].split('=');
			strLink += '<td align="center" nowrap"><a href="main.cfm?action=ShowDPCategory&table=Dp_' + strActionName + '_Cat&CatId=' + objArray[0] + '&actionName=' + strActionName +  '&adminMode=No" target="mainFrame" class="Top_SubLinks"><li>' + objArray[1] +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li></a></td>'
		}
		strLink += '</tr></table>'
		//alert(strLink);
		return strLink;
		
	}
	


