

		clicked=false;
		
		function getFile(href)
		{
			window.open(href);
			return false;
		}
		
		function OpenCalculator()
		{
		
			window.open('http://www.aresti-realestate.com/EstateBOSV2/MortgageCalculator.aspx', ['Mortgage_Calculator'], ['status=no, scrollbars=no, width=400, height=270, resizable=yes']);
		
		}
		function OpenMetric()
		{
		
			window.open('http://www.aresti-realestate.com/MetricConverter.aspx', ['Metric_Calculator'], ['status=no, scrollbars=no, width=400, height=270, resizable=yes']);
		
		}
		function OpenCurrency()
		{
			window.open('http://www.xe.com/ucc/');
		}

		function HideLoading()
		{
			
			Loading1 = document.getElementById("Loading");
									
			Loading1.style.visibility="hidden";
			
		}
		
		function setSelectedArticle(task)
		{
			
			box = document.getElementById("taskID");
			//Loading1 = document.getElementById("Loading");						
			if((box != null) && clicked != true)
			{
				box.value = task;
				box.focus();
				box.blur();
				//Loading1.style.visibility="visible";
				__doPostBack('taskID','')
				
			}
		}
		
		function openPopUp(strHREF)
		{
				window.open(strHREF,"externalwindow","height=450,width=610,resizable =yes,scrollbars=yes,status=yes,toolbar=yes,menubar=yes,location=yes")
		}
     
		
				
		function LoadFileIframe(left,top,width,height,filename)
		{
			var tempIFrame=document.createElement('iframe');
			tempIFrame.setAttribute('id','RSIFrame');
			tempIFrame.style.border='0px';
			tempIFrame.style.width=width;
			tempIFrame.style.height=height;
			tempIFrame.style.position='absolute';
			tempIFrame.style.top=top;
			tempIFrame.style.left=left;
			tempIFrame.src=filename;
			IFrameObj = document.body.appendChild(tempIFrame);

		}		
				
		function adjustIFrameSize (iframeWindow) 
		{
			if (iframeWindow.document.height) 
			{
				var iframeElement = parent.document.getElementById(iframeWindow.name);
				iframeElement.style.height = iframeWindow.document.height + 'px';
				iframeElement.style.width = iframeWindow.document.width + 'px';
			}
			else 
			if (document.all) 
			{
			    var iframeElement = parent.document.all[iframeWindow.name];
			    if (iframeWindow.document.compatMode &&	iframeWindow.document.compatMode != 'BackCompat') 
			    {
				iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
				iframeElement.style.width = iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
			    }
			    else 
			    {
				iframeElement.style.height =iframeWindow.document.body.scrollHeight + 5 + 'px';
				iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
			    }
		     }
		 }
								
					
		function sizeIframe()
		{
			winHeight = document.body.clientHeight;
			winWidth = document.body.clientWidth;
			winHeight = winHeight - 71;
			//winHeight = winHeight - 40;
			//document.write(winHeight);
			if (winHeight > 0)
			{
			 //document.all.content.style.height = winHeight;
			
			 if(document.layers)
			 {  
              			document.layer1.top = winHeight+document.body.scrollTop ;
			  	document.layer2.top = winHeight+document.body.scrollTop+46 ;
			 }

			 
			 if(document.all!=null)
			 {
			  
			  layer1.style.top = winHeight+document.body.scrollTop ;	
			  layer2.style.top = winHeight+document.body.scrollTop+46 ;
			 
			  //layer1.style.width = document.body.scrollWidth;//winWidth;//document.body.scrollWidth ;	
			  if (winWidth<760)
			  {
			   layer1.style.width=760;
			   layer2.style.width=760;
			  }
			  else
			  {
			   layer1.style.width=winWidth;
			   layer2.style.width=winWidth;
			  }
			  // alert(layer1.style.width);
			  //layer2.style.width = document.body.scrollWidth ;
			 }
			 
			
			}// winheight>0
		}
		
		function screen_width ()
		{
		// CHECK IF v4+ BROWSER (MICROSOFT OR NETSCAPE)
		if ( window.screen ) {
			return ( screen.width );

		// ELSE CHECK IF JAVA ENABLED BROWSER (NS2, NS3, IE3, etc.)
		} else if ( navigator.javaEnabled () ) {
			var toolkit = java.awt.Toolkit.getDefaultToolkit ();
			var screen_size = toolkit.getScreenSize ();       
			return ( screen_size.width );

		// OTHERWISE THERE IS NO WAY TO CHECK
		} else {
			return (0);
		}
		}

		function screen_height ()
		{
		// CHECK IF v4+ BROWSER (MICROSOFT OR NETSCAPE)
		if ( window.screen ) {
			return ( screen.height );

		// ELSE CHECK IF JAVA ENABLED BROWSER (NS2, NS3, IE3, etc.)
		} else if ( navigator.javaEnabled () ) {
			var toolkit = java.awt.Toolkit.getDefaultToolkit ();
			var screen_size = toolkit.getScreenSize ();       
			return ( screen_size.height );

		// OTHERWISE THERE IS NO WAY TO CHECK
		} else {
			return (0);
		}
		}
		
		function getvalue(ScreenRes)
		{

				objControl = document.getElementById(ScreenRes);
				if(objControl != null)
				{
					objControl.value = screen_width()+"x"+screen_height();
				}
				else 
				{
					//alert("FIELD NOT FOUND");
					window.setTimeout(getvalue('ScreenResolution'), 100);
				}
				//alert(screen_width()+"x"+screen_height());

		}
		
		function myscreen (iframe1)
		{

			objControl = document.getElementById(iframe1);

			if(objControl != null)
				{
					objControl.src = "savescreen.aspx?screen="+screen_width()+"x"+screen_height();
				}
				else 
				{
					//alert("FIELD NOT FOUND");
					window.setTimeout(screen ('iframescreen'), 100);
				}



		}


			
		function closewindow(closew)
			{


			objControl = document.getElementById(closew);
			objControl.value="close";

			//getvalue(screenres);
			//alert('object '+objControl.value);
			content_menu_editable_items.submit();

			//window.setTimeout(200);
					
		}
		
		function setHome(homepage){
		if(navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE") + 5) >= 5 && navigator.platform.indexOf("Win16") == -1 && navigator.platform.indexOf("Mac") == -1){
		homepage.style.behavior='url(#default#homepage)';
		homepage.setHomePage("http://www.aresti-realestate.com");
//homepage.href="#";
		homepage.href="http://www.aresti-realestate.com";
		return true;
		}
			else {return false}
		}