﻿// Fichier JScript


function OpenImageProperties(pCmsContentValueUUID, pCmsContentUUID, pCmsMask_PropertyUUID)
{
	var strUrl   = URLRoot + 'PopIF/LoadImagePOP.aspx?CmsContentValueUUID=' + pCmsContentValueUUID + '&CmsContentUUID=' + pCmsContentUUID + '&CmsMask_PropertyUUID=' + pCmsMask_PropertyUUID;
	var sFeatures="dialogHeight: 750px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl,"toto", sFeatures);
	AllowRedirect = false;
	window.document.forms[0].submit();
}

function OpenLink(pCmsContentUUID, pCmsMask_PropertyUUID)
{
	var strUrl   = URLRoot + 'PopIF/LinkPOP.aspx?CmsContentUUID=' + pCmsContentUUID + '&CmsMask_PropertyUUID=' + pCmsMask_PropertyUUID;
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl,"toto", sFeatures);
	window.document.forms[0].submit();
}

function DragSnap(pClientSnapID)
{
	eval(pClientSnapID).StartDragging(event)
}

function ExpandSnap(pClientSnapID)
{
	eval(pClientSnapID).ToggleExpand();
}

function OpenAddPagelet(pCmsPageUUID)
{
	var strUrl = URLRoot + "PopIF/AddPageletPOP.aspx?CmsPageUUID=" + pCmsPageUUID;
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl, "lulu", sFeatures);
	//window.document.forms[0].submit();
}

function OpenPageletContent(pCmsPage_PageletUUID, pTypeOfContent, pCmsContentUUID)
{
	var strUrl   = URLRoot + "PopIF/PageletContentPOP.aspx?CmsPage_PageletUUID=" + pCmsPage_PageletUUID + "&TypeOfContent=" + pTypeOfContent + "&CmsContentUUID=" + pCmsContentUUID;
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl,"lolo", sFeatures);
	window.document.forms[0].submit();
}

function OpenPageletParam(pCmsPage_PageletUUID)
{
	var strUrl   = URLRoot + "PopIF/PageletParamPOP.aspx?CmsPage_PageletUUID=" + pCmsPage_PageletUUID;
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl,"toto", sFeatures);
	window.document.forms[0].submit();
}

function OpenPageletTarget(pCmsPage_PageletUUID, pTypeOfContent)
{
	var strUrl   = URLRoot + "PopIF/PageletTargetPOP.aspx?CmsPage_PageletUUID=" + pCmsPage_PageletUUID + "&TypeOfContent=" + pTypeOfContent;
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	SetSpotVisible("true");
	window.showModalDialog(strUrl,"toto", sFeatures);
	window.document.forms[0].submit();
}

function OpenUserAccount()
{
	var strUrl   = URLRoot + "PopIFUser/UserAccountPOP.aspx";
	var sFeatures="dialogHeight: 700px; dialogWidth: 600px; help: no; status: no";
	window.showModalDialog(strUrl,"toto", sFeatures);
}

function FlashGoPage(pTargetURL, pIsTargetBlanck)
{
	if(AllowRedirect)
	{
		if(pIsTargetBlanck == "True")
		{
			window.open(pTargetURL)
		}
		else document.location.href = pTargetURL;
	}
}

function GoTarget(pUrl, pTargetBlank)
{
	if(AllowRedirect)
	{
		if(pUrl != "")
		{
			if(pTargetBlank == "true")
			{
				window.open(pUrl)
			}
			else
			{
				window.location.href = pUrl;
			}
		}
	}
}