﻿function OpenWebmail()
{
   window.open("http://webmail.ramveer.com");
}

function LaunchOutLook()
{

 try
 {
    var outlookApp = new ActiveXObject("Outlook.Application"); 
     var nameSpace = outlookApp.getNameSpace("MAPI"); 
     var mailFolder = nameSpace.getDefaultFolder(6); 
     mailFolder.Display();
  }
 catch(e)
 {
   var errorMsg = "Outlook could no be launched";
   alert(errorMsg);
   return;
 }
}

function GoogleSearch()
{
       var tb = igtbar_getToolbarById("ctl00xUltraWebToolbar1");
       var text=tb.Items.fromKey("Search").getText();
       while (text.indexOf( '"' ) != -1) 
           { text = text.replace( '"', "%22" )} 
       while (text.indexOf("'" ) != -1) 
           { text = text.replace("'", "%27" )}
       while (text.indexOf("+" ) != -1) 
           { text = text.replace("+", "%2B" )}
       while (text.indexOf(" " ) != -1) 
           { text = text.replace(" ", "+" )}
       var url="http://www.google.com/cse?cx=partner-pub-7409884524291038%3As2xg19wvaly&ie=ISO-8859-1&q="+text+"&sa=Search"
       window.open(url);
}
function openProDetails()
{
  window.open("PropDetails.htm");
}

var mqAry1=['App_Themes/Images/Marquee/image.jpg','App_Themes/Images/Marquee/image1.jpg','App_Themes/Images/Marquee/image2.jpg','App_Themes/Images/Marquee/image3.jpg','App_Themes/Images/Marquee/image4.jpg','App_Themes/Images/Marquee/image5.jpg','App_Themes/Images/Marquee/image6.jpg'];
//var mqAry2=['App_Themes/Images/Marquee/img5.gif','App_Themes/Images/Marquee/img6.gif','App_Themes/Images/Marquee/img7.gif','App_Themes/Images/Marquee/img8.gif','graphics/img9.gif','graphics/img10.gif','App_Themes/Images/Marquee/img11.gif','App_Themes/Images/Marquee/img12.gif','App_Themes/Images/Marquee/img13.gif','App_Themes/Images/Marquee/img14.gif','App_Themes/Images/Marquee/img0.gif','graphics/img1.gif','App_Themes/Images/Marquee/img2.gif','App_Themes/Images/Marquee/img3.gif','App_Themes/Images/Marquee/img4.gif'];

function start() 
{
   new mq('m1',mqAry1,200);
   //new mq('m2',mqAry2,60);// repeat for as many fuields as required
   mqRotate(mqr); // must come last
}
//window.onload = start;
var mqr = [];
 function mq(id,ary,wid)
 {
  this.mqo=document.getElementById(id); 
  var heit = this.mqo.style.height; 
  this.mqo.onmouseout=function() {mqRotate(mqr);}; 
  this.mqo.onmouseover=function() {clearTimeout(mqr[0].TO);}; 
  this.mqo.ary=[]; var maxw = ary.length; 
  for (var i=0;i<maxw;i++)
   {
      this.mqo.ary[i]=document.createElement('img'); 
      this.mqo.ary[i].src=ary[i]; 
      this.mqo.ary[i].style.position = 'absolute'; 
      this.mqo.ary[i].style.left = (wid*i)+'px'; 
      this.mqo.ary[i].style.width = wid+'px'; 
      this.mqo.ary[i].style.height = heit; this.mqo.appendChild(this.mqo.ary[i]);
    }
    mqr.push(this.mqo);
   }
  function mqRotate(mqr)
   {
     if (!mqr) return; 
     for (var j=mqr.length - 1; j > -1; j--)
      {
        maxa = mqr[j].ary.length;
        for (var i=0;i<maxa;i++)
         {
           var x = mqr[j].ary[i].style;  
           x.left=(parseInt(x.left,10)-1)+'px';
         } 
         var y = mqr[j].ary[0].style; 
         if (parseInt(y.left,10)+parseInt(y.width,10)<0)
           { 
            var z = mqr[j].ary.shift(); 
            z.style.left = (parseInt(z.style.left) + parseInt(z.style.width)*maxa) + 'px'; 
            mqr[j].ary.push(z);
           }
         } 
         mqr[0].TO=setTimeout('mqRotate(mqr)',5);
      } 
      
 function WebPanel4_ExpandedStateChanging(oWebPanel, oEvent)
 {
	//Add code to handle your event here.
	if(oWebPanel.getHeader()._element.innerText=="Logoff")
	{
	 oEvent.cancel=true;
	}
 }  
 function LogoffNode()
 {
   var logoff= document.all["ctl00_logoff"];
   logoff.value="true";
   aspnetForm.submit();
 }
 
 function Aggreed()
 {
   var agree=document.all["ctl00_ContentPlaceHolder1_ckbAgree"];
   if(agree.checked==true)
      return true;
    else
    {  
     alert("You are not select I Agree");
     return false;
     }
 }
