﻿
/**/
var layer_id;
function popUpTopEditor() {
	layer_id = 'TopEditorDiv';	
	//alert(layer_id);
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}

//
layer_id = 'TopNormalDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
	}

/**/
var layer_id;
function popUpFooterSubDiv(zCount) {
	layer_id = 'FooterSubDiv_' + zCount;	
	//alert(layer_id);
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
	}

/**/

var layer_id;
function popUpTopSubDiv() {
	layer_id = 'TopSubDiv';	
	//alert(layer_id);
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
	}

/**/

var layer_id;
function popUpFooterEditor() {
	layer_id = 'FooterEditorDiv';	
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}

//	}
	
	layer_id = 'FooterNormalDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
	
	//document.getElementById('PopUpButton').innerHTML = '<a href="javascript:popUpNormal();">ללא עריכה</a>' ;
}

/**/
var layer_id;
function popUpEditor() {

	layer_id = 'EditorDiv';	
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}

//	}
	
	layer_id = 'NormalDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
	
	document.getElementById('PopUpButton').innerHTML = '<a href="javascript:popUpNormal();">ללא עריכה</a>' ;
	CKEDITOR.replace( 'editor1' );
}
/**/
function popUpNormal() {

	layer_id = 'NormalDiv';	
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
//	
	layer_id = 'EditorDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
//		
	layer_id = 'TopNormalDiv';	
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
//	
	layer_id = 'TopEditorDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
//
	layer_id = 'FooterNormalDiv';	
	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
//	
	layer_id = 'FooterEditorDiv';
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
		
	document.getElementById('PopUpButton').innerHTML = '<a href="javascript:popUpEditor();">עריכת תוכן</a>' ;	
}

/**/
var layer_id;
function popUpLayer(layer_id) {

if (document.all[layer_id].style.visibility!="visible"){
	//alert('NOT visible');

	if (document.all){
		//alert('block');
		document.all[layer_id].style.display="block"
		document.all[layer_id].style.visibility="visible"
		}
	else
		//alert('show');
		if(document.layers){
		document.layers[layer_id].visibility="show"
		}
	}	

else
	{
	//alert(layer_id);
	
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
	}
}

function SC_Off(layer_id) {
	//alert(layer_id 'OFF');
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
	{
		if(document.layers){
		document.layers[layer_id].visibility="hide"
		}
	}
}

function LayerOff(layer_id) {
	//alert(layer_id 'OFF');
	if (document.all){
		//alert('hiding');
		document.all[layer_id].style.display="none"
		document.all[layer_id].style.visibility="hidden"
	}
	else
	{
		if(parent.document.layers){
		document.layers[layer_id].visibility="hide"
		}
	}
}
/**/
function openItemInfoWin(url) {
	var ItemInfoWin = window.open(url, 'ColorChooser', 'resizable,width=550,height=410');
	}
/**/
function OpenPrintWindow(strUrl,zWidth,zHeight)
{
	strWidthHeight = "resizable,left=100,top=30,width=" + zWidth + ",height=" + zHeight;
	window.open(strUrl,"PrintWindow",strWidthHeight);
}
/**/

/**/
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 OpenOriginalPicture(FullFileName)
	{window.open("../../OriginalPicture.cfm?FullFileName=" + FullFileName,"OriginalPicture","status=0,left=1,top=1,height=340,width=430");
	 return;}
/**/	 
function OpenSmartWin(strUrl)
{
	window.open(strUrl,"SmartWindow","status,left=100,top=30,height=400,width=600");
}
/**/
function OpenFilesManager(strURL)
	{
	window.open(strURL,"FilesManager","status,left=200,top=30,height=600,width=800");
	 return;
	 }
/**/ 

function OpenSmartWindow(strUrl,strName,zWidth,zHeight,zReferer)
{
	//strUrl = strUrl + "?zReferer=" + zReferer;
	strWidthHeight = "status,resizable,left=100,top=30,width=" + zWidth + ",height=" + zHeight;
	window.open(strUrl,strName,strWidthHeight);
}

