var IsHidden = false;
var winPagePropertiesObj = null;
function IschkChanged(chkID)
{
IsHidden = true;
}
function IsChanged()
{
IsHidden = true;
}
function CancelEvent()
{
if(IsHidden==true)
var pos = confirm("Changes not saved. Do you want to continue?");
else
window.close();
if (pos)
{
window.close();
}
else if(IsHidden==false && pos==true)
{
window.close();
}
else
return false;
}
function SitePopup()
{
var guidID=document.getElementById("hidGuidID").value;
window.open("/Modules/CMS/SiteProperties.aspx?GuidID="+ guidID,"sitepropeties","width=705,height=575,location=no,scrollbars=no,left=300,Top=350");
return false;
}
function PagePopup()
{
var guidID=document.getElementById("hidGuidID").value;
winPagePropertiesObj = window.open("/Modules/CMS/PageProperties.aspx?GuidID="+ guidID,"pagepropeties","width=705,height=625,location=no,scrollbars=no,left=300,Top=350");
return false;
}
function ElmoBarPagePopup()
{
var guidID=document.getElementById("rightClickHidGuidID").value;
window.open("/Modules/CMS/PageProperties.aspx?GuidID="+ guidID,"pagepropeties","width=705,height=625,location=no,scrollbars=no,left=300,Top=350");
return false;
}
function SelectImage()
{
var guidID= window.opener.document.getElementById("hidGuidID").value;
var url = "/Modules/CMS/ImageManager.aspx?placement=pageproperties&itemid="+ guidID;
if(document.getElementById("hdnAttorneyImageID"))
url = url + "&mediaid=" + document.getElementById("hdnAttorneyImageID").value;
//Anand on 23th June 2010: Modified code to open media manager as modal window
if(!window.opener.parent.closed)
window.opener.parent.openModalWindow(url, "dialogPagePropertiesMediaManager", "690", "520"); // calls global method from \Assets\js\ContentEditor\modalOverlay.js
self.blur();
}
// function validator()
// {
//
// var re = new RegExp("")<0)
// {
// alert("The CustomMetaTag field should be an HTML meta tag.EX: ");
// return false;
// }
// }
//
// }
function ParentRefresh()
{
var parentURL=window.opener.location.href;
if(!isNullorEmpty(parentURL))
{
parentURL=parentURL.replace("#","");
try
{
window.opener.location.href = parentURL;
}
catch(Error)
{
}
}
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
function isNullorEmpty(parentURL)
{
if(parentURL==null ||parentURL =="")return true;
else return false ;
}
//Added by Praveen to set the GUID when IFrame refreshes
function SetGUID(guid)
{
if(parent.document.getElementById("hidGuidID"))
{
parent.document.getElementById("hidGuidID").value=guid;
}
}