var isNS = (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) >= 4);
var stringCmdPrefix = (isNS) ? "document.": "document.all.";
var stringCmdStyle = (isNS) ? "": ".style.";
var mouseoverColor = "red"
var MyPhotoFlag = "off";

function showClass(Class){
//	Class.style = "font-size: 24";
		Class.className = Class.className.substring(0, Class.className.length - 3);
}
function donotShowClass(Class){
	Class.className = Class.className + "Off";
}
function changeColor(ID, color){
// alert("This is here " + " " + ID + " " + color);
	eval(stringCmdPrefix + ID + stringCmdStyle + 'color = "' + color + '"');	
}

function showDiv(ID){
// alert("This is here " + " " + ID + " " + color);
	eval(stringCmdPrefix + ID + stringCmdStyle + 'visibility = "visible"');	
}

function hideDiv(ID){
// alert("This is here " + " " + ID + " " + color);
	eval(stringCmdPrefix + ID + stringCmdStyle + 'visibility = "hidden"');	
}

function wipeIn(ID, currentWidth, finalWidth){
	if (MyPhotoFlag == "off"){
		MyPhotoFlag = "inProcess";
	 	eval(stringCmdPrefix + ID + stringCmdStyle + 'visibility = "visible"');	
		wipeIn1(ID, currentWidth, finalWidth);
	}	
}

function wipeIn1(ID, currentWidth, finalWidth){
// alert("This is here " + " " + ID );
 if (currentWidth < finalWidth){
 	eval(stringCmdPrefix + ID + stringCmdStyle + 'width = "' + currentWidth + '"');	
 	currentWidth += 1;
 	setTimeout('wipeIn1("' + ID + '",' + currentWidth + ',' + finalWidth + ')', 10); 
 }else{
	MyPhotoFlag = "on";
 }	
} 


function wipeOut(ID, currentWidth, finalWidth){
 if (MyPhotoFlag == "on"){
 	MyPhotoFlag = "inProcess";
// 	eval(stringCmdPrefix + ID + stringCmdStyle + 'visibility = "visible"');	
	wipeOut1(ID, currentWidth, finalWidth);
 } else {
 	setTimeout('wipeOut("' + ID + '",' + currentWidth + ',' + finalWidth + ')', 10); 
 }	
}

function wipeOut1(ID, currentWidth, finalWidth){
// alert("This is here " + " " + ID );
 if (currentWidth > finalWidth){
 	eval(stringCmdPrefix + ID + stringCmdStyle + 'width = "' + currentWidth + '"');	
 	currentWidth -= 1;
 	setTimeout('wipeOut1("' + ID + '",' + currentWidth + ',' + finalWidth + ')', 10); 
 }else{
	MyPhotoFlag = "off";
 	eval(stringCmdPrefix + ID + stringCmdStyle + 'visibility = "hidden"');	
 }	

}

function fullSize(){
self.moveTo(0, 0);
self.resizeTo(screen.availWidth, screen.availHeight);
}

function fullSize2(){
alert("This is a test");
}

function namedOpenWindow(url, name){
	var outWidth = 800;
	var outHeight = 600;
//	var outWidth = screen.width;
//	var outHeight = screen.height;
//alert(screen.width + "  -  " + screen.height);
	var screenWidth = screen.width;
	var screenHeight = screen.height;
	var screenTop = ((screen.height - outHeight) / 2);
	var screenLeft = ((screen.width - outWidth) / 2);
	
	name  = window.open	(url, name,
					     "scrollbars=no," +
					     "toolbar=no," +
					     "location=no," +
					     "directories=no," +
					     "status=no," +
					     "menubar=no," +
					     "resizable=no," +
					     "width= " + (outWidth - 8) + "," +
					     "height= " + (outHeight - 30) + "," +
					     "top=" +  screenTop + "," +
					     "left=" + screenLeft);
}

function openWindow(url){
	var outWidth = 800;
	var outHeight = 600;
//	var outWidth = screen.width;
//	var outHeight = screen.height;
//alert(screen.width + "  -  " + screen.height);
	var screenWidth = screen.width;
	var screenHeight = screen.height;
	var screenTop = ((screen.height - outHeight) / 2);
	var screenLeft = ((screen.width - outWidth) / 2);
	
	index_b_window = window.open(url, "Presentation",
					     "scrollbars=no," +
					     "toolbar=no," +
					     "location=no," +
					     "directories=no," +
					     "status=no," +
					     "menubar=no," +
					     "resizable=no," +
					     "width= " + (outWidth - 8) + "," +
					     "height= " + (outHeight - 30) + "," +
					     "top=" +  screenTop + "," +
					     "left=" + screenLeft);
}

function openWindow2(url){
	var outWidth = 800;
	var outHeight = 600;
//	var outWidth = screen.width;
//	var outHeight = screen.height;
//alert(screen.width + "  -  " + screen.height);
	var screenWidth = screen.width;
	var screenHeight = screen.height;
	var screenTop = ((screen.height - outHeight) / 2);
	var screenLeft = ((screen.width - outWidth) / 2);
	
	index_b_window2 = window.open(url, "Presentation2",
					     "scrollbars=yes," +
					     "toolbar=no," +
					     "location=no," +
					     "directories=no," +
					     "status=no," +
					     "menubar=no," +
					     "resizable=no," +
					     "width= " + (outWidth - 8) + "," +
					     "height= " + (outHeight - 30) + "," +
					     "top=" +  screenTop + "," +
					     "left=" + screenLeft);
}

function openWindow3(url){
	var outWidth = 800;
	var outHeight = 600;
//	var outWidth = screen.width;
//	var outHeight = screen.height;
//alert(screen.width + "  -  " + screen.height);
	var screenWidth = screen.width;
	var screenHeight = screen.height;
	var screenTop = ((screen.height - outHeight) / 2);
	var screenLeft = ((screen.width - outWidth) / 2);
	
	index_b_window3 = window.open(url, "Presentation3",
					     "scrollbars=yes," +
					     "toolbar=no," +
					     "location=no," +
					     "directories=no," +
					     "status=no," +
					     "menubar=no," +
					     "resizable=yes," +
					     "width= " + (outWidth - 8) + "," +
					     "height= " + (outHeight - 30) + "," +
					     "top=" +  screenTop + "," +
					     "left=" + screenLeft);
	index_b_window3.moveTo(30,30);
	index_b_window3.resizeTo(screen.availWidth - 60, screen.availHeight - 60);

}

function newPage(){
document.writeln("<html>");
document.writeln("<body>This is the new test page</body>");
document.writeln("</html>");
}


// This code runs when we open the page new
var factor = screen.height / 900;


document.write("<style type='text/css'>");
	
if(screen.width <= 800){
	document.write("body{font-family: Arial; font-size: 7pt; color: black;}");
	document.write("table{font-family: Arial; font-size: 7pt; color: black;}");
	document.write("tt{font-size: 15;}");
	document.write(".myTitles{font-size: 11pt; border-top: 0.5pt solid; border-bottom: 0.5pt solid}");
} else {
	document.write("body{font-family: Arial; font-size: 10pt; color: black;}");
	document.write("table{font-family: Arial; font-size: 10pt; color: black;}");
	document.write(".myTitles{font-size: 14pt; border-top: 0.5pt solid; border-bottom: 0.5pt solid}");
	document.write("tt{font-size: 20;}");
}		
	document.write("body{font-family: Arial; font-size: " + (10 * factor) + "pt; color: black;}");
	document.write("table{font-family: Arial; font-size: " + (10 * factor) + "pt; color: black;}");
	document.write(".myTitles{font-size:" + (14 * factor) + "pt; border-top: 0.5pt solid; border-bottom: 0.5pt solid}");
	document.write("tt{font-size: " + (20 * factor) + ";}");


document.write("ul { margin: 0, 0, 0, 20;}");
document.write("</style>");


window.defaultStatus='Sue Nieves - Toronto, Thornhill, Richmond Hill, Mississauga,Vaughan';

var i = 0;
image = new Array();
image[i++] = 'image400.jpg';
image[i++] = 'image401.jpg';
image[i++] = 'image402.jpg';
image[i++] = 'image403.jpg';
image[i++] = 'image404.jpg';
image[i++] = 'image405.jpg';
image[i++] = 'image406.jpg';
image[i++] = 'image407.jpg';
image[i++] = 'image408.jpg';
image[i++] = 'image409.jpg';
image[i++] = 'image410.jpg';
image[i++] = 'image411.jpg';
image[i++] = 'image412.jpg';
image[i++] = 'image413.jpg';
image[i++] = 'image414.jpg';
image[i++] = 'image415.jpg';
image[i++] = 'image416.jpg';
image[i++] = 'image417.jpg';
image[i++] = 'image418.jpg';
image[i++] = 'image419.jpg';
image[i++] = 'image420.jpg';
image[i++] = 'image421.jpg';
image[i++] = 'image422.jpg';
image[i++] = 'IM003581_b_400x400_res300_w.jpg';
image[i++] = 'IM003585_400x400_300res_web.jpg';
var randomImage = "/images/" + image[Math.round(Math.random()*(image.length-1))];

var imageNumber = 0;
function rotateImage1(){
	if (imageNumber >= image.length) imageNumber = 0;
		document.ourPics.src = "images/" + image[imageNumber++];
		window.setTimeout('rotateImage1();',8000);
}

var imageNumber = 0;
function rotateImage(){
	if (imageNumber >= image.length) imageNumber = 0;
		document.ourPics.src = "/images/" + image[imageNumber++];
		window.setTimeout('rotateImage();',8000);
}


function tito(){
alert("tototototot");	
	document.href = document.href;
	window.setTimeout('tito();',8000);
}
