<!--script by: SK updated FEB 2007 -->
<!--begin
//functions to change images
function newImage(arg) {
            if (document.images) {
                        rslt = new Image();
                        rslt.src = arg;
                        return rslt;
            }
}

function changeImages() {
            if (document.images && (preloadFlag == true)) {
                        for (var i=0; i<changeImages.arguments.length; i+=2) {
                                    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
                        }
            }
}

var preloadFlag = false;
//function preloadImages() {
//          if (document.images) {
            
//                      tMenu_over = newImage("images/tMenu_over.gif");
//                      rMenuEnd_over = newImage("images/rMenuEnd_over.gif");
//                      tMenu_over = newImage("images/tMenu_over.gif");
//                      rMenuEnd_over = newImage("images/rMenuEnd_over.gif");
//                      preloadFlag = true;
//          }
//}

//function to open separate window 
            function openWindow(URL)
            {
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'scrollbars=1, location=1, resizable=1, width=650, height=450, left = 200, top = 40');");
            }

//function to open separate window 
            function openWindowTwo(URL)
            {
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'scrollbars=1, location=1, resizable=1, width=700, height=550, left = 200, top = 40');");
            }
//function to open separate smaller window 
            function openW(URL)
            {
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'scrollbars=1, location=1, resizable=1, width=450, height=250, left = 200, top = 40');");
            }

//function to open a pop-up window
            var count=0;
   //function to open window with link to contest entry and information
            function popupPage()
            {           
                        //alert("count="+count);
                        var page = "popUp.html";
                        windowprops = "height=290,width=375,location=no,top=0,left=0,scrollbars=no,menubars=no,toolbars=no,resizable=yes";
            
                        if(count==0)
                        {           
                                    window.open(page, "Popup", windowprops);
                                    count++;
                        }
                        
            }
            

//function to bookmark the site
function addbookmark()
              {
                  var bookmarkURL="http://www.larryedgar.com"
          var bookmarkTitle="Larry Edgar--Sutton Group Sales Representative, Barrie, Ontario"
      
         if (document.all)
                         {
             window.external.AddFavorite(bookmarkURL,bookmarkTitle)
         }

        if (document.layers)
                        {
            window.alert('Please hit CTRL-D to bookmark this page.')
        }
             }

//functions to rotate properties for sale with link to appropriate mls.ca listing

if (document.images)
{
// First create an array with images to display  
    propertyImages=new Array("../images/listings/708253.jpg","../images/listings/1000196.jpg");

     // create another array with a list of URLs. Keep the order the same as images.
    adURLs=new Array("www.mls.ca/propertyresults.aspx?id=708253&mode=5",
		"www.icx.ca/propertyDetails.aspx?PropertyID=9002039");
				   
	thisAd=0;
}

 //The following function cycles through each image.
function cycleAds()
{
    if (document.images)
   {
        if (document.adBanner.complete)
       {
            if (++thisAd==propertyImages.length)
                thisAd=0;

            document.adBanner.src=propertyImages[thisAd];
        }
    }

    // change to next banner every 15 seconds
    setTimeout("cycleAds()", 2000);
}

// This function is used to direct the user to the property info at mls.ca

function gotoAd()
{
    document.location.href="javascript:openWindow('http://' + adURLs[thisAd])";
}


//function to scroll information on featured property on scroll bar.
var speed = 50
var pause = 2000
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Know someone that's buying or selling a home? Call and find out about my special Referral Program!" 

 
//Change variable bannerRunning message
var currentMessage = 0
var offset = 0
function stopBanner() {
	if (bannerRunning)
	clearTimeout (timerID)
	bannerRunning = false
}
function startBanner() {	stopBanner()
	showBanner()

}
function showBanner() {
	var text = ar[currentMessage]
	if (offset < text.length) {
	if (text.charAt(offset) == " ")
		offset++
		var partialMessage = text.substring(0, offset + 1)
		window.status = partialMessage
		offset++
		timerID = setTimeout("showBanner()", speed)
		bannerRunning = true
	} else {
		offset = 0
		currentMessage++
		if (currentMessage == ar.length)
			currentMessage = 0
		timerID = setTimeout("showBanner()", pause)
		bannerRunning = true
	}
}


//disable the view source right click function
var message="Function Disabled";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
else if (document.layers||document.getElementById) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

//featured property scroll box for information
// change this to where you store the blank.gif image
var blank = "http://www.larryedgar.com/blank.gif";

topedge = 100;  // location of news box from top of page
leftedge = 290;  // location of news box from left edge
boxheight = 150;  // height of news box
boxwidth = 300;  // width of news box
scrollheight = 150; // total height of all data to be scrolled

function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 50);
}

//End-->