// JavaScript Document



<!--
	var intSwitch2 = 1;
	var intMaxImages2 = 2;
	var intSwitch3 = 1;
	var intMaxImages3 = 2;
	var intSwitchL2 = 1;
	var intMaxImagesL2 = 3;
	var intSwitchT1 = 1;
	var intMaxImagesT1 = 5;
	
	function thingsToDoOnLoad() {
		//set-up the initial images to be displayed...
			// bottom window on left...
			//newHTML = "<img src='images/leftsidebar_2a.jpg' width='214' height='261' alt='leftside 2' border='0' usemap='#leftsidebarMap2' />";
//			newHTMLmap = "<map name='leftsidebarMap2' id='leftsidebarMap2'><area shape='rect' coords='15,32,200,578' href='http://www.pcinsurance.ca' target='_blank' alt='PC Insurance'/></map>";
			//document.getElementById('leftSidebar2').innerHTML = newHTML;
//			document.getElementById('divLeftSideMap2').innerHTML = newHTMLmap;
			//alert("here i am");
			
			// middle window on right...
//			newHTML = "<img src='images/rightsidebar_2b.jpg' width='267' height='228' alt='rightside 2' border='0' usemap='#rightsidebarMap2' />";
//			newHTMLmap = "<map name='rightsidebarMap2' id='rightsidebarMap2'><area shape='rect' coords='22,6,248,223' href='http://www.autotrader.ca' target='_blank' alt='group sales'/></map>";
//			document.getElementById('rightSidebar2').innerHTML = newHTML;
//			document.getElementById('divRightSideMap2').innerHTML = newHTMLmap;

			// bottom window on right...
//			newHTML = "<img src='images/rightsidebar_3b.gif' width='267' height='229' alt='rightside 2' border='0' usemap='#rightsidebarMap3' />";
//			newHTMLmap = "<map name='rightsidebarMap3' id='rightsidebarMap2'><area shape='rect' coords='3,19,246,220' href='http://www.H2Blu.ca' target='_blank' alt='H2Blu'/></map>";
//			document.getElementById('rightSidebar3').innerHTML = newHTML;
//			document.getElementById('divRightSideMap3').innerHTML = newHTMLmap;

			// bottom window on top...
//			newHTML = "<img src='images/topadspot_a.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
//			newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/features.htm#autoexotica' /></map>";
//			document.getElementById('divTopadspot').innerHTML = newHTML;
//			document.getElementById('divTopadspotMap').innerHTML = newHTMLmap;

		setUpTheIntervalToRotateTheAds();
	}


	function setUpTheIntervalToRotateTheAds() {
		var int2=self.setInterval("rotateAds2()",5000);	
		var int3=self.setInterval("rotateAds3()",10000);
		var int3=self.setInterval("rotateAdsL2()",7000);	
		var int3=self.setInterval("topadspot()",6000);
	}
	function rotateAds2() {
		notSoRandomImage2(['images/rightsidebar_2a.jpg','images/rightsidebar_2b.jpg']);
	}
	function rotateAds3() {
		notSoRandomImage3(['images/rightsidebar_3a.jpg','images/rightsidebar_3b.gif']);
	}
	function rotateAdsL2() {
		notSoRandomImageL2(['images/leftsidebar_2a.jpg','images/leftsidebar_2b.jpeg']);
	}
	function topadspot() {
		notSoRandomImageTop(['images/topadspot_a.jpg','images/topadspot_b.jpeg']);
	}
	


	function notSoRandomImage2() {
		intSwitch2 = intSwitch2 + 1;
		if (intSwitch2 > intMaxImages2) {
			intSwitch2 = 1;
		};
		switch(intSwitch2) {
			case 1:
				newHTML = "<img src='images/rightsidebar_2a.jpg' width='267' height='228' alt='rightside 2' border='0' usemap='#rightsidebarMap2' />";
				newHTMLmap = "<map name='rightsidebarMap2' id='rightsidebarMap2'><area shape='rect' coords='22,6,248,223' href='http://www.coverme.com/products/travel-insurance.jsp?MKT=J84' target='_blank' alt='CoverMe Travel'/></map>";
  				break;
			case 2:
				newHTML = "<img src='images/rightsidebar_2b.jpg' width='267' height='228' alt='rightside 2' border='0' usemap='#rightsidebarMap2' />";
				newHTMLmap = "<map name='rightsidebarMap2' id='rightsidebarMap2'><area shape='rect' coords='22,6,248,223' href='http://www.autotrader.ca' target='_blank' alt='group sales'/></map>";
  				break;
			default:
  			//do nothing
		};
		document.getElementById('rightSidebar2').innerHTML = newHTML;
		document.getElementById('divRightSideMap2').innerHTML = newHTMLmap;
	}



	function notSoRandomImage3() {
		intSwitch3 = intSwitch3 + 1;
		if (intSwitch3 > intMaxImages3) {
			intSwitch3 = 1;
		};
		switch(intSwitch3) {
			case 1:
				newHTML = "<img src='images/rightsidebar_3a.jpg' width='267' height='229' alt='rightside 3' border='0' usemap='#rightsidebarMap3' />";
				newHTMLmap = "<map name='rightsidebarMap3' id='rightsidebarMap3'><area shape='rect' coords='23,19,246,220' href='http://www.facebook.com/#!/autoshowcanada' target='_blank' alt='CIAS Facebook page' /></map>";
  				break;
			case 2:
				newHTML = "<img src='images/rightsidebar_3b.gif' width='267' height='229' alt='rightside 3' border='0' usemap='#rightsidebarMap3' />";
				newHTMLmap = "<map name='rightsidebarMap3' id='rightsidebarMap3'><area shape='rect' coords='3,19,246,220' href='http://www.H2Blu.ca' target='_blank' alt='H2Blu'/></map>";
  				break;
			default:
  			//do nothing
		};
		document.getElementById('rightSidebar3').innerHTML = newHTML;
		document.getElementById('divRightSideMap3').innerHTML = newHTMLmap;
	}






	function notSoRandomImageL2() {
		intSwitchL2 = intSwitchL2 + 1;
		if (intSwitchL2 > intMaxImagesL2) {
			intSwitchL2 = 1;
		};
		switch(intSwitchL2) {
			case 1:
				newHTML = "<img src='images/leftsidebar_2a.jpg' width='214' height='621' alt='leftside 2' border='0' usemap='#leftsidebarMap2' />";
				newHTMLmap = "<map name='leftsidebarMap2' id='leftsidebarMap2'><area shape='rect' coords='15,32,200,578' href='http://www.pcinsurance.ca' target='_blank' alt='PC Insurance' /></map>";
  				break;
			case 2:
				newHTML = "<img src='images/leftsidebar_2b.jpg' width='214' height='621' alt='leftside 2' border='0' usemap='#leftsidebarMap2' />";
				newHTMLmap = "<map name='leftsidebarMap2' id='leftsidebarMap2'><area shape='rect' coords='15,32,200,578' href='http://www.yokohama.ca' target='_blank' alt='Yokohama.ca' /></map>";
  				break;
			case 3:
				newHTML = "<img src='images/leftsidebar_2c.jpg' width='214' height='621' alt='leftside 2' border='0' usemap='#leftsidebarMap2' />";
				newHTMLmap = "<map name='leftsidebarMap2' id='leftsidebarMap2'><area shape='rect' coords='15,32,200,578' href='http://oee.nrcan.gc.ca/transportation/tools/fuelratings/ratings-search.cfm' target='_blank' alt='NRCan’s Fuel Consumption Guide' /></map>";
  				break;

			default:
  			//do nothing
		};
		document.getElementById('leftSidebar2').innerHTML = newHTML;
		document.getElementById('divLeftSideMap2').innerHTML = newHTMLmap;
	}





	function notSoRandomImageTop() {
		intSwitchT1 = intSwitchT1 + 1;
		if (intSwitchT1 > intMaxImagesT1) {
			intSwitchT1 = 1;
		};
		switch(intSwitchT1) {
			case 1:
				newHTML = "<img src='images/topadspot_a.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
				newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/features.htm#autoexotica' /></map>";
  				break;
			case 2:
				newHTML = "<img src='images/topadspot_b.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
				newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/features.htm#triumphclassics' /></map>";
  				break;
			case 3:
				newHTML = "<img src='images/topadspot_c.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
				newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/mobile' /></map>";
  				break;
			case 4:
				newHTML = "<img src='images/topadspot_a.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
				newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/features.htm#autoexotica' /></map>";
  				break;
			case 5:
				newHTML = "<img src='images/topadspot_b.jpg' alt='' name='topadspot' width='645' height='166' border='0' usemap='#topadspotMap' id='topadspot' />";
				newHTMLmap = "<map name='topadspotMap' id='topadspotMap'><area shape='rect' coords='56,11,590,152' href='http://www.autoshow.ca/features.htm#triumphclassics' /></map>";
  				break;

			default:
  			//do nothing
		};
		document.getElementById('divTopadspot').innerHTML = newHTML;
		document.getElementById('divTopadspotMap').innerHTML = newHTMLmap;
	}




function getOneOrZero(){
	var myDate=new Date();
	var myTime = myDate.getTime();
	var myMod = myTime % 2;
	return myMod;
}


//-->


