function EditFlashGal(hProperty,sVoyagerPath,sPageGroup) 
 {  
 //var str = '" + sVoyagerPath + "ctm_FlashGallery.asp?hmy='+ hProperty +'&E=1&F.sPage=" + sPageGroup + "'; 
  var str =  sVoyagerPath + "ctm_FlashGallery.asp?hmy="+ hProperty +"&E=1&F.sPage=" + sPageGroup; 
  window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=no,height=560,width=860,left=20,top=50,alwaysraised=yes'); 
} 

function EditImage(sVoyagerPath,Wt,Ht,PgImgHMY,iType,ImgHMY,hProperty,hPage,hTemplate) 
{	var str = sVoyagerPath + "ctm_DocManager.aspx?E=1&w="+ Wt + "&h=" + Ht + "&PgImgHMY=" + PgImgHMY + "&Eitype=" + iType + "&DocImgHMY=" + ImgHMY + "&HMY=" + hProperty + "&hPage=" + hPage + "&hTemplate=" + hTemplate ; 
	window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=yes,height=500,width=860,left=20,top=50,alwaysraised=yes'); 
} 
 
function EditBackgroudImage(sVoyagerPath,Wt,Ht,PgImgHMY,iType,ImgHMY,hProperty,hPage,hTemplate) 
{	var str = sVoyagerPath + "ctm_UploadDoc.aspx?DoNotShowHeaderAndCategory=-1&" + "&iType=" + iType + "&hProperty=" + hProperty + "&w="+ Wt + "&h=" + Ht + "&PgImgHMY=" + PgImgHMY + "&DocImgHMY=" + ImgHMY + "&hPage=" + hPage + "&hTemplate=" + hTemplate ; 
	if (iType==131)
	{

		EditImage(sVoyagerPath,Wt,Ht,PgImgHMY,iType,ImgHMY,hProperty,hPage,hTemplate);
	}
	else
	{
		window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=yes,height=500,width=860,left=20,top=50,alwaysraised=yes'); 
	}
} 

function EditPhotoGal(hProperty,sVoyagerPath) 
{
var str = sVoyagerPath + "ctm_PhotoGallery.asp?hmy="+ hProperty + "&E=1";
window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=no,height=560,width=860,left=20,top=50,alwaysraised=yes');
}

function EditSection(hSection,sVoyagerPath)
{
var str = sVoyagerPath + "ctm_PortalEdit_Section.asp?iFunction=0&hMy=" + hSection;
window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=no,height=500,width=760,left=20,top=50,alwaysraised=yes');
}

function ApproveSection(hSection,sVoyagerPath)
{
var str = sVoyagerPath + "ctm_PortalEditApp_Section.asp?iFunction=0&hMy=" + hSection;
window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=no,height=500,width=760,left=20,top=50,alwaysraised=yes');
}

function EditMenuFn(hPageGroup,hMenuset,hProperty,sVoyagerPath)
{
var str = sVoyagerPath + "ctm_DocMgr_ReviewMenu.asp?hPageGroup=" + hPageGroup + "&hmenuset=" + hMenuset + "&HMY="+ hProperty;
window.open(str,'SectionWindow','toolbar=no,status=yes,resizable=yes,location=no,scrollbars=no,height=500,width=860,left=20,top=50,alwaysraised=yes');
}

function AutoResize_iFrame(obj)
{
try
	{
	var curr_Height = obj.height;
	if(curr_Height==0) 
		{
			var theHeight;
			theHeight=0;
			theHeight =window.frames[obj.name].document.body.scrollHeight;
			if(theHeight==0){setTimeout('AutoResize_iFrameExpress("' + obj.name + '");',2000);}
			else{AutoResize_iFrameExpress(obj.name);}
		}  
  	}
catch(err){}	
}

function AutoResize_iFrameExpress(obj)
{
try
	{
	window.frames[obj].document.body.style.overflow='hidden';
	document.getElementById(obj).height=window.frames[obj].document.body.scrollHeight;
	}
catch(err){}
}

function AutoResize_iFrame_FromChildWindow(obj)
{
try
	{	
	var iFrameId;
	if (obj.document.contentDocument) { // For NS6
	    iFrameId = obj.document.contentDocument.name; 
	  } else if (obj.document.contentWindow) { // For IE5.5 and IE6
	    iFrameId = obj.document.contentWindow.document.name;
	  } else if (obj.document.defaultView) { // For FF
	    iFrameId = obj.document.defaultView.name;
	  }else if (obj.document.parentWindow) { // For IE
	    iFrameId = obj.document.parentWindow.name;
	  }
	AutoResize_iFrameExpress(iFrameId);
	}
catch(err){}
}

function walkscore(strPageGroup)
{	
	var pg,url
	var left = (screen.width/2)-(400/2);
	var top = (screen.height/2)-(400/2);
	url = "../Pages/PortalCommonWalkScore.aspx?pagegroup=" + strPageGroup;
	window.open(url ,"WalkScore","toolbar=no,resizable=yes,location=no,scrollbars=no,height=265,width=605,alwaysraised=yes,top="+top+ ",left="+left);
}

function referafriend(propid,pagegrp)
{
 var str='../pages/PortalCommonReferAFriend.aspx?PropertyId='+propid+'&Pagegroup='+pagegrp;
 window.open(str,'_blank','toolbar=0,status=no,resizable=1,width=500,height=550,top=100,left=150');

}
