/***************************

Includes JS functions for mailing a page

to a friend and printing a page

***************************/



// GLOBAL VARS

var scrnW = screen.width;

var scrnH = screen.availHeight;

var scrnOffset = 10;

var exp = new Date()

var scrollPos; //current Y position of window content



// ------------- FORM MANIPULATION FUNCTIONS -------------------

// focus the sender box when mailing page

function focus_email() {

	document.forms[0].sender.focus();

}



// open send a page to a friend

function send_page(ttl) {

	var l = scrnW - 255 - scrnOffset; 

	if (ttl) var pageTitle = escape(ttl);

	else pageTitle = "";

	sendPage = open("../home/send_me.php?"+url()+"&t="+pageTitle,"sendPage","left="+l+",top=0,width=255,height=330,scrollbars=0,resizable=0");

}



// validate form to send a page to a friend 

function val_send_page() {

	var e = document.forms[0].email1.value;

	if ((val_email(e)) && (document.forms[0].sender.value != "")) {

		document.forms[0].submit();

	} else  alert("A valid email address and name is required to send the article.");

}



// validate any email address

function val_email(field) {

	var re = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;

	return re.test(field);

}



// validate a number

function val_num(field) {

	return !isNaN(field);

}



// check for empty field

function isEmpty(field)

{

	 (!field || field == "")

	{

		return true;

	}

	return false;

}



// validate advanced search page (adv_search.php)

function advsearch(field1, field2, frm) {

	if ((document.forms[frm][field1].value != "") &&

	    (document.forms[frm][field2].value != "")) {

		alert("PLEASE TRY YOUR SEARCH AGAIN USING:\n\n\tKeyword(s)\n\t- OR -\n\tSale Date + Lot No.\n\nSearching by Keyword + Lot No. is not possible");  

		return;

	

	// cory 11-08-2003 -- added date field validation

	} else if (document.forms[frm][field1].value == "") {

		if (isDate(document.forms[frm]["saledate"].value) == false) {

			return;

		}

		else

		{

			send_form(frm);

			return;

		}

	

	} else {

		send_form(frm);	

	}

}



// validate regular search page (reg_search.php)

function regsearch(field1, frm) {

	// cory 11-08-2003 -- added date field validation

	if (isDate(document.forms[frm][field1].value) == false) {

		return;    

	} else {

		send_form(frm);

	}

}





// validate mailing list form A

function val_maillistA(frm)

{

	var f = document.forms[frm];

	

	if (((!isEmpty(f["firstname"].value)) || (f["firstname"].value != "")) &&

	    ((!isEmpty(f["lastname"].value)) || (f["lastname"].value != "")) &&

	    (val_email(f["email"].value)))

	{

//		submit_form(frm);

		send_form(frm);

	}

	else

	{

		alert("You have not completely filled out the form\nto receive your auction lists.");

	}

	    

}





// validate mailing list form B

function val_maillistB(frm) 

{

	var f = document.forms[frm];

	var f1 = new Array("firstname1","lastname1","email");

	var f2 = new Array("firstname2","lastname2","address","city","province","postalcode","country");

	

	var f1_INCOMPLETE = false;

	var f2_INCOMPLETE = false;

	

	for (i=0; i < f1.length; i++)

	{

		if ((!isEmpty(f[f1[i]].value)) || (f[f1[i]].value != ""))

		{

			if (f1[i] == "email")

			{

				if (val_email(f[f1[i]].value)) f1[i] = true;

				else f1[i] = false;

			}

			else

			{

				f1[i] = true;

			}	

		}

		else

		{

			f1[i] = false;

		}

	}

	for (j=0; j < f2.length; j++)

	{

		if ((!isEmpty(f[f2[j]].value)) || (f[f2[j]].value != ""))

		{

			f2[j] = true;

		}

		else

		{

			f2[j] = false;

		}

	}

	for (k=0; k < f1.length; k++)

	{

		if (f1[k] == false) 

		{

			f1_INCOMPLETE = true;

			break;

		}	

	}

	for (m=0; m < f2.length; m++)

	{

		if (f2[m] == false) 

		{

			f2_INCOMPLETE = true;

			break;

		}

	}

	

	if ((f1_INCOMPLETE == true) && (f2_INCOMPLETE == true))

	{

		alert("You have not completely/correctly filled out the form\nto receive email -OR- surface mail notification.");

		return;

	}

	else if ((f1_INCOMPLETE == false) || (f2_INCOMPLETE == false))

	{

		send_form(frm);

		return;

	}

}





// global form submitter to submit a form

function send_form(f) {

	document.forms[f].submit();

}







// Date Validation functions

var dtCh= "/";

var minYear=1900;

var maxYear=2100;



function isInteger(s)

{

	var i;

    for (i = 0; i < s.length; i++)

    {   

        // Check that current character is number.

        var c = s.charAt(i);

        if (((c < "0") || (c > "9"))) return false;

    }

    // All characters are numbers.

    return true;

}



function stripCharsInBag(s, bag)

{

	var i;

    var returnString = "";

    // Search through string's characters one by one.

    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)

    {   

        var c = s.charAt(i);

        if (bag.indexOf(c) == -1) returnString += c;

    }

    return returnString;

}

function daysInFebruary (year)

{

	// February has 29 days in any year evenly divisible by four,

    // EXCEPT for centurial years which are not also divisible by 400.

    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );

}

function DaysArray(n) 

{

	for (var i = 1; i <= n; i++) 

	{

		this[i] = 31

		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30;}

		if (i==2) {this[i] = 29;}

    } 

    return this

}

function isDate(dtStr)

{

	var daysInMonth = DaysArray(12)

	var pos1 = dtStr.indexOf(dtCh)

	var pos2 = dtStr.indexOf(dtCh,pos1+1)

	var strMonth = dtStr.substring(0,pos1)

	var strDay = dtStr.substring(pos1+1,pos2)

	var strYear = dtStr.substring(pos2+1)

	strYr=strYear

	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)

	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)

	for (var i = 1; i <= 3; i++) 

	{

		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1);

	}

	month=parseInt(strMonth)

	day=parseInt(strDay)

	year=parseInt(strYr)

	if (pos1 == -1 || pos2 == -1)

	{

		alert("The date format should be : mm/dd/yyyy")

		return false;

	}

	if (strMonth.length<1 || month<1 || month>12)

	{

		alert("Please enter a valid month")

		return false;

	}

	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month])

	{

		alert("Please enter a valid day")

		return false;

	}

	if (strYear.length != 4 || year == 0 || year<minYear || year>maxYear)

	{

		alert("Please enter a valid 4 digit year")

		return false;

	}

	if (dtStr.indexOf(dtCh,pos2+1) !=- 1 || isInteger(stripCharsInBag(dtStr, dtCh)) == false)

	{

		alert("Please enter a valid date")

		return false;

	}

return true;

}





// ----- COOKIE FUNCTIONS --------------------------------

// generic cookie functions

function get_cookie(name) {

var cname = name + "="

var dc = document.cookie

	if (dc.length > 0) {

		begin = dc.indexOf(cname);

		if (begin != -1) {

			begin += cname.length;

			end = dc.indexOf(";", begin);

			if (end == -1) end = dc.length;

			return unescape(dc.substring(begin, end));

		}

	}

	return null;

}

function set_cookie(name, value, expires) {

	document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString())

}



// Set cookie to save Client ID on Vendor login page

// Then, submit the Vendor login form

function save_login(frm) {

	var f = document.forms['vendorForm'];

	if (f.savelogin.checked == true) {

		exp.setTime(exp.getTime() + (365 * 24 * 60 * 60 * 1000)) //set expires to 365 days ahead

		set_cookie("WaddVendorLn", f.login.value, exp);

	} else {

  		exp.setTime(exp.getTime() - (1000 * 60 * 60 * 24)); //set expires one day ago

  		set_cookie("WaddVendorLn", f.login.value, exp);

	}

		

	// submit the form

	f.submit();

}





// Get the cookie that has the saved Client ID

function get_login(frm) {

	var f = document.forms['vendorForm'];

	var loginCookie = get_cookie("WaddVendorLn");

	if (loginCookie != null) {

		f.login.value = loginCookie;

		f.savelogin.checked = true;

	}	

}



// rollovers

function mon(num) {

	document["img"].src = over[num].src;

}





// expand or contract layer

function vis(el) {

	if (document.layers) alert("Internet Explorer required");

	else {

		if ((lyrobj(el).display == "none") ||

		    (lyrobj(el).display == "")) {

			mon(1);

			lyrobj(el).display = "block";

		} else {

			mon(0);

			lyrobj(el).display = "none";

		}	

	}

}



// popup large image in a new window

// 'pg' param is (true) if it is an HTML page

function popup_win(i, w, h, pg) {

	

	if (!w) w = 640;

	if (!h) h = 480;

	var l = scrnW - w - scrnOffset;

	

	// image alone

	if (!pg) {

		popup = open("","popup","left="+l+",top=0,width="+w+",height="+h+",scrollbars=1,resizable=1,status=1");

		popup.document.open();

		popup.document.write("<html><head><title>Waddington's&trade;</title></head>");

		popup.document.write("<body bgcolor='#FFFFFF' marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>");

		popup.document.write("<table height='100%' border=0 align='center'><tr><td>");

		popup.document.write("<img src='../../media/" + i + "'>");

		popup.document.write("</td></tr></table></body></html>");

		popup.document.close();

		popup.focus();

	} else {

		// a page to popup 

		popup = open(i,"popup","left="+l+",top=0,width="+w+",height="+h+",scrollbars=1,resizable=1,status=1");

		popup.focus();

	}

}





// alternative to the above

function goPreview(url,winname,w,h) 

{

	if(parseInt(navigator.appVersion)>3) {

		var prevWin=window.open("../auctions/"+url,winname,"width="+w+",height="+h+",scrollbars=0,status=1");

	} else {

	 alert("You are not running a version 4 or higher browser.\n\nYou can download the latest browser from the text link below.");

	 window.focus();

	}

}







// New function to popup galleries that use an Ivframe for all browsers

// block NN4 here.

function goIframe(url,winname,w,h)

{

  if((parseInt(navigator.appVersion)>3) && !document.layers) {

     var prevWin=window.open("../auctions/"+url,winname,"width="+w+",height="+h+",scrollbars=0,status=1");

  } else {

     alert("You are not running a version 5 or higher browser.\n\nYou can download a later browser from www.microsoft.com or www.netscape.com.");

     window.focus();

  }

}


// New function to popup galleries from index.php for all browsers - jlong.at.waddingtons.ca

// block NN4 here.

function goIndexPreview(url,winname,w,h)

{

  if((parseInt(navigator.appVersion)>3) && !document.layers) {

     var prevWin=window.open("pages/auctions/"+url,winname,"width="+w+",height="+h+",scrollbars=0,status=1");

  } else {

     alert("You are not running a version 5 or higher browser.\n\nYou can download a later browser from www.microsoft.com or www.netscape.com.");

     window.focus();

  }

}


// close a window in a certain number

// of seconds

function closeit(secs) {

	setTimeout("window.close()",secs);

}





// parse url to get what I need

// stuff after "?"

function url() {

	var querystring = location.search.substring(1);

	return querystring;

}



// print a page

function print_page() {

	var l = scrnW - 640 - scrnOffset;

	open("../home/print_me.php?"+url(),"printPage","left="+l+",top=0,width=640,height=480,scrollbars=1,resizable=1,toolbar=1,menubar=1,status=1");

}





// scroll to the top of the page

function pagetop() {

	if (navigator.appName.toLowerCase() == "netscape") scrollPos = window.pageYOffset;

	else scrollPos = document.body.scrollTop;

	if (parseInt(scrollPos) < 1) {

		window.scroll(0,0);

		return;

	} else {

		window.scrollBy(0,-90);

		setTimeout("pagetop()",1);

	}	

}



// send the Personal Customer Information change form
function phpChangeInfo()
{
	var msg = "Your personal infortmation changes are about to be sent to Joyner&trade;\n";
	msg += "Press 'OK' if you would like to proceed, otherwise press 'Cancel'";
	if (confirm(msg))
	{
		var f = document.forms[0];
		f.method = "POST";
		f.action = "/pages/4Dpages/change_info.php";
		f.url.value = location.href + "?" +location.search.substring(1);
		//alert(f.url.value);
		f.submit();
	}	
}


// -- specific popup for spring Inuit preview
// -- Added by gg (gord.at.waddingtons.ca) on Feb. 27, 2004

function inuitPop(url,winname,w,h) 
{

	var inuit=window.open(url,winname,"width="+w+",height="+h+",scrollbars=0,status=0");

	inuit.focus();

	

}

// -- specific popup for Evening Out auction from main page
// -- Added by gg (gord.at.waddingtons.ca) on Aug. 27, 2004

function eveningPop() 
{

	var evening=window.open("/eveningout/","evening","width=756,height=475,scrollbars=0,status=0,resizable=0");

	evening.focus();

	

}

//semi fail-proof IE check for Flash movie on main page
//added by Gord (gord.at.waddingtons.ca) May 31, 2004

function isMSIE() {

var browserString = navigator.userAgent.toLowerCase();

if ((browserString.indexOf('msie') != -1) && (document.getElementById)) return 1;
else return 0;

}

//Added 04/21/2004 - GG - gord.at.waddingtons.ca
//Rotation for main page / timed rotation image load

var IMGBASE = "../../media/global-banners/";

//ARRAYS
var splashArray = new Array();
//splashArray[0] = "<img src=\'" +IMGBASE+ "03.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"262,192,364,208\" HREF=\"mailto:tq@waddingtons.ca\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,228,365,242\" HREF=\"mailto:jd@waddingtons.ca\"></map>";
//splashArray[0] = "<img src=\'" +IMGBASE+ "04.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,192,388,208\" HREF=\"mailto:books@waddingtons.ca\"></map>";
//splashArray[0] = "<img src=\'" +IMGBASE+ "05.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"262,151,378,166\" HREF=\"mailto:adm@waddingtons.ca\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"263,194,369,209\" HREF=\"mailto:co@waddingtons.ca\"></map>"; 
//splashArray[1] = "<a href=\"mailto:jd@waddingtons.ca\"><img src=\'" +IMGBASE+ "06.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[2] = "<a href=\"mailto:dpm@waddingtons.ca\"><img src=\'" +IMGBASE+ "07.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>"; 
//splashArray[3] = "<a href=\"mailto:joyner@waddingtons.ca\"><img src=\'" +IMGBASE+ "08.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[4] = "<img src=\'" +IMGBASE+ "09.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[0] = "<a href=\"mailto:sr@waddingtons.ca\"><img src=\'" +IMGBASE+ "11.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[1] = "<a href=\"mailto:info@waddingtons.ca\"><img src=\'" +IMGBASE+ "12.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[9] = "<img src=\'" +IMGBASE+ "12.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[10] = "<img src=\'" +IMGBASE+ "13.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"196,66,301,82\" HREF=\"mailto:ajm@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"197,99,298,115\" HREF=\"mailto:mv@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"196,163,300,180\" HREF=\"mailto:wfk@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"197,197,291,214\" HREF=\"mailto:el@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"361,67,457,84\" HREF=\"mailto:tq@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"360,98,454,116\" HREF=\"mailto:jd@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"361,147,466,165\" HREF=\"mailto:jpm@waddingtons.ca\')\"></map>";

//splashArray[0] = "<img src=\'" +IMGBASE+ "1.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#jwfa\">";
//splashArray[1] = "<img src=\'" +IMGBASE+ "2.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#ethno\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"362,258,490,284\" HREF=\"javascript:go('auctions/catalogues/nativespring2004.php')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"362,290,490,313\" HREF=\"javascript:goPreview('preview/2004/ethno_pring/intro.html','ethno_spring',750,550)\"></map>";
//splashArray[0] = "<a href=\"javascript:go(\'auctions/upcoming.php\')\"><img src=\'" +IMGBASE+ "1.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[0] = "<a href=\"javascript:go(\'auctions/upcoming.php\')\"><img src=\'" +IMGBASE+ "2.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[2] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "4.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[1] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "5.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[4] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "6.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[2] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "7.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[6] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "9.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[7] = "<a href=\"javascript:go(\'services/consign.php\')\"><img src=\'" +IMGBASE+ "10.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[7] = "<a href=\"javascript:go(\'auctions/upcoming.php\')\"><img src=\'" +IMGBASE+ "11.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[7] = "<img src=\'../../media/home/bg_jwfa_main_spring2004.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"320,292,472,312\" HREF=\"javascript:go('auctions/catalogues/jwfaspring2004.php')\"></map>";

//splashArray[0] = "<img src=\'" +IMGBASE+ "3.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#dec\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"266,261,393,285\" HREF=\"javascript:go('auctions/catalogues/decspring2004.php')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"266,291,394,316\" HREF=\"javascript:goPreview('preview/2004/decart_spring/intro.html','decart',750,550)\"></map>";
//splashArray[1] = "<img src=\'" +IMGBASE+ "4.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#euro\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"241,262,370,287\" HREF=\"javascript:go('auctions/catalogues/eurospring2004.php')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"242,292,369,314\" HREF=\"javascript:goPreview('preview/2004/eurospring/intro.html','eurospring',750,550)\"></map>";

//splashArray[0] = "<img src=\'" +IMGBASE+ "tsunami2.gif\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[1] = "<img src=\'" +IMGBASE+ "tsunami.gif\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[2] = "<img src=\'" +IMGBASE+ "03.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[3] = "<img src=\'" +IMGBASE+ "04.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[4] = "<img src=\'" +IMGBASE+ "05.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[5] = "<img src=\'" +IMGBASE+ "06.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[6] = "<img src=\'" +IMGBASE+ "07.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[7] = "<img src=\'" +IMGBASE+ "08.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[8] = "<img src=\'" +IMGBASE+ "09.jpg\' width=\'500\' height=\'330\' border=\'0\'>";

//splashArray[0] = "<img src=\'" +IMGBASE+ "consign_bg_2005/collectibles.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[0] = "<img src=\'" +IMGBASE+ "consign_bg_2005/jewellery.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[0] = "<img src=\'" +IMGBASE+ "contact.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[0] = "<a href='http://www.waddingtons.ca/pages/home/index.php?c=services/filmfestival.php'><img src=\'" +IMGBASE+ "consign_bg_2005/filmfestival.jpg\' width=\'500\' height=\'330\' border=\'0\'></a>";
//splashArray[1] = "<img src=\'" +IMGBASE+ "consign_bg_2005/internationalprints.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[2] = "<img src=\'" +IMGBASE+ "consign_bg_2005/jewellery.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[3] = "<img src=\'" +IMGBASE+ "consign_bg_2005/books.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[0] = "<img src=\'" +IMGBASE+ "consign_bg_2005/inuit.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//	splashArray[0] = '<a href="http://www.waddingtons.ca/prints/"><img src="' + IMGBASE + 'alternate-flash-images/a-prints.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="http://www.waddingtons.ca/inuit/"><img src="' + IMGBASE + 'alternate-flash-images/c-inuit.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="http://www.waddingtons.ca/internationalart/"><img src="' + IMGBASE + 'alternate-flash-images/e-intart.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="http://www.joyner.ca/"><img src="' + IMGBASE + 'alternate-flash-images/f-joyner.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="/fineart/"><img src="' + IMGBASE + 'alternate-flash-images/23.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="/auction/23june2008/"><img src="' + IMGBASE + 'alternate-flash-images/61.jpg" width="500" height="330" border="0"></a>';
//  splashArray[1] = '<a href="/fineart/"><img src="' + IMGBASE + 'alternate-flash-images/62.jpg" width="500" height="330" border="0"></a>';
//	splashArray[0] = '<a href="/auction/11december2008j/"><img src="' + IMGBASE + 'alternate-flash-images/82.jpg" width="500" height="330" border="0"></a>';
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



	
		

	
	
	
	
	
	
	
	
	
	
	
	
	
	
				splashArray[0] = '<a href="http://www.waddingtons.ca/auction/19august2010d/"><img src="' + IMGBASE + '2010/08-19-costume.jpg" width="500" height="330" border="0"></a>';
				splashArray[1] = '<a href="http://decorativearts.waddingtons.ca/online/"><img src="' + IMGBASE + '2010/10-28-scientific.jpg" width="500" height="330" border="0"></a>';
				splashArray[2] = '<a href="http://asianart.waddingtons.ca/upcoming/"><img src="' + IMGBASE + '2010/12-13-asian.jpg" width="500" height="330" border="0"></a>';
	
	

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//	splashArray[2] = '<a href="/fineart/"><img src="' + IMGBASE + 'alternate-flash-images/27.jpg" width="500" height="330" border="0"></a>';
//	splashArray[2] = '<a href="/offthewall/"><img src="' + IMGBASE + 'alternate-flash-images/08.jpg" width="500" height="330" border="0"></a>';
//	splashArray[1] = '<a href="http://www.waddingtons.ca/upcoming/"><img src="' + IMGBASE + 'alternate-flash-images/d-jewellery.jpg" width="500" height="330" border="0"></a>';
//splashArray[0] = "<img src=\'" +IMGBASE+ "consign_bg_2005/internationalart.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[1] = "<img src=\'" +IMGBASE+ "consign_bg_2005/decorativearts.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[2] = "<img src=\'" +IMGBASE+ "consign_bg_2005/decorativearts2.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[3] = "<img src=\'" +IMGBASE+ "consign_bg_2005/joyner.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[4] = "<img src=\'" +IMGBASE+ "consign_bg_2005/20th.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[5] = "<img src=\'" +IMGBASE+ "consign_bg_2005/moorcroft.jpg\' width=\'500\' height=\'330\' border=\'0\'>";

//splashArray[5] = "<img src=\'" +IMGBASE+ "consign_bg_2005/intart.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[4] = "<img src=\'" +IMGBASE+ "consign_bg_2005/inuit.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[6] = "<img src=\'" +IMGBASE+ "consign_bg_2005/doulton.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[6] = "<img src=\'" +IMGBASE+ "consign_bg_2005/books.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[7] = "<img src=\'" +IMGBASE+ "consign_bg_2005/judaica.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//splashArray[5] = "<img src=\'" +IMGBASE+ "consign_bg_2005/joyner.jpg\' width=\'500\' height=\'330\' border=\'0\'>";



//GLOBS
//var globRand = 0; //always initialize as 0
//var globMax = 10; //Note: Must fill in amount of arrays until I can figure out reference to index...
var invDelay = 7500; //Time to rotate each splash
var splashNumber = 0; //DNC!
	

/* function newGlobRand()
{

var oldRand = globRand;
var globRand = Math.round(Math.random()*globMax);


if (globRand != oldRand) return globRand;
else if ((globRand+1) != globMax) return globRand++;
else if (!(globRand-1) < 0) return globRand--;
else return 0;

}
*/
	  
//Updated Sept. 2 2004 to show images sequentially instead of randomly, GG

function writeNewSplash()
{
	
	if (splashNumber == splashArray.length)
	{
		splashNumber = 0;
	}
	
	if (!isMSIE()) {
		
		document.getElementById("ms").innerHTML = splashArray[splashNumber];
		splashNumber++;
		
	}
	
}

/* function writeNewSplash()
{
if (!isMSIE()) {
document.getElementById("ms").innerHTML = splashArray[newGlobRand()];
return true;
}
} */

//writeNewSplash(); //first call
var interval = setInterval('writeNewSplash()',invDelay);


// New function to popup galleries from index.php for all browsers - jlong.at.waddingtons.ca


function goIndexPreview(url,winname,w,h)

{

  if((parseInt(navigator.appVersion)>3) && !document.layers) {

     var prevWin=window.open("pages/auctions/"+url,winname,"width="+w+",height="+h+",scrollbars=0,status=1");

  } else {

     alert("You are not running a version 5 or higher browser.\n\nYou can download a later browser from www.microsoft.com or www.netscape.com.");

     window.focus();

  }

}

//added June 3, 2004 - gord.at.waddingtons.ca

function imgGrow(imgname) {

window.onerror = null;

var imgWin=window.open("","Image","width=560,height=500,scrollbars=1,status=0,resizable=1");
imgWin.document.open();
imgWin.document.write("<html><head>");
imgWin.document.write("<title>Waddington's&trade; - Larger Preview</title>");
imgWin.document.write("</head>");
imgWin.document.write("<body bgcolor='#000000'>");
imgWin.document.write("<img src='/media/auctions/jwfa-highlights-images/" +imgname+ "' width='550' alt=''>");
imgWin.document.write("</body></html>");
imgWin.document.close();
imgWin.focus();

}
  
//added June 23, 2004 - gord.at.waddingtons.ca

function imgGrow2(imgname, w, h) {

window.onerror = null;

var imgWin=window.open("","Image","width=" +w+ ",height=" +h+ ",scrollbars=0,status=0,resizable=0");
imgWin.document.open();
imgWin.document.write("<html><head>");
imgWin.document.write("<title>Waddington's&trade; - Larger Preview</title>");
imgWin.document.write("</head>");
imgWin.document.write("<body bgcolor='#000000' topmargin='0' leftmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>");
imgWin.document.write("<img src='" +imgname+ "' alt=''>");
imgWin.document.write("</body></html>");
imgWin.document.close();
imgWin.focus();

}

//added June 28, 2004 - gord.at.waddingtons.ca
//added for JL - will dynamically resize window to fit dimensions of an image once loaded
//default is 500x500

function imgGrow3(imgname) {

window.onerror = null;

var imgWin=window.open("","Image","width=500,height=500,scrollbars=0,status=0,resizable=0");
imgWin.document.open();
imgWin.document.write("<html><head>\n");
imgWin.document.write("<title>Waddington's&trade; - Larger Preview</title>\n");
imgWin.document.write("<script language=\"javascript\">function init()\n");
imgWin.document.write("{\n");
imgWin.document.write("window.resizeTo(document.images['preview'].width + 6, document.images['preview'].height + 26);");
imgWin.document.write("}\n");
imgWin.document.write("</script>");
imgWin.document.write("</head>\n");
imgWin.document.write("<body bgcolor='#ffffff' topmargin='0' leftmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0' onLoad='init()'>\n");
imgWin.document.write("<img src='" +imgname+ "' alt='' id='preview' name='preview'>\n");
imgWin.document.write("</body></html>\n");
imgWin.document.close();
imgWin.focus();

}


//
// Timed rotation for Joyner homepage - Flash replacement
//
//Added 09/15/2004 - GG - gord.at.waddingtons.ca
//Rotation for main page / timed rotation image load

var JWIMGBASE = "/media/home/joyner/";

//ARRAYS
var jwSplashArray = new Array();
//jwSplashArray[0] = "<img src=\'" +JWIMGBASE+ "1.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"259,179,385,196\" HREF=\"mailto:books@waddingtons.ca\')\">";
//jwSplashArray[1] = "<img src=\'" +JWIMGBASE+ "2.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,179,367,192\" HREF=\"mailto:sr@waddingtons.ca\')\">";
//jwSplashArray[2] = "<img src=\'" +JWIMGBASE+ "3.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"262,192,364,208\" HREF=\"mailto:tq@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,228,365,242\" HREF=\"mailto:jd@waddingtons.ca\')\"></map>";
//jwSplashArray[3] = "<img src=\'" +JWIMGBASE+ "4.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,192,388,208\" HREF=\"mailto:books@waddingtons.ca\')\"></map>";
//jwSplashArray[4] = "<img src=\'" +JWIMGBASE+ "5.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"262,151,378,166\" HREF=\"mailto:adm@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"263,194,369,209\" HREF=\"mailto:co@waddingtons.ca\')\"></map>";
//jwSplashArray[5] = "<img src=\'" +JWIMGBASE+ "6.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"262,180,366,199\" HREF=\"mailto:jd@waddingtons.ca\')\"></map>";
//jwSplashArray[6] = "<img src=\'" +JWIMGBASE+ "7.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"263,165,379,181\" HREF=\"mailto:dpm@waddingtons.ca\')\"></map>";
//jwSplashArray[7] = "<img src=\'" +JWIMGBASE+ "8.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"261,195,387,212\" HREF=\"mailto:joyner@waddingtons.ca\')\"></map>";
//jwSplashArray[8] = "<img src=\'" +JWIMGBASE+ "9.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"260,164,366,181\" HREF=\"mailto:sr@waddingtons.ca\')\"></map>";
//jwSplashArray[9] = "<img src=\'" +JWIMGBASE+ "10.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
//jwSplashArray[10] = "<img src=\'" +JWIMGBASE+ "11.jpg\' width=\'500\' height=\'330\' border=\'0\' usemap=\"#main\"><map name=\"main\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"196,66,301,82\" HREF=\"mailto:ajm@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"197,99,298,115\" HREF=\"mailto:mv@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"196,163,300,180\" HREF=\"mailto:wfk@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"197,197,291,214\" HREF=\"mailto:el@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"361,67,457,84\" HREF=\"mailto:tq@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"360,98,454,116\" HREF=\"mailto:jd@waddingtons.ca\')\"><AREA SHAPE=\"rect\" ALT=\"\" COORDS=\"361,147,466,165\" HREF=\"mailto:jpm@waddingtons.ca\')\"></map>";

jwSplashArray[0] = "<img src=\'" +JWIMGBASE+ "consign01.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
jwSplashArray[1] = "<img src=\'" +JWIMGBASE+ "consign02.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
jwSplashArray[2] = "<img src=\'" +JWIMGBASE+ "consign03.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
jwSplashArray[3] = "<img src=\'" +JWIMGBASE+ "consign04.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
jwSplashArray[4] = "<img src=\'" +JWIMGBASE+ "consign05.jpg\' width=\'500\' height=\'330\' border=\'0\'>";
jwSplashArray[5] = "<img src=\'" +JWIMGBASE+ "consign06.jpg\' width=\'500\' height=\'330\' border=\'0\'>";


//GLOBS
//var globRand = 0; //always initialize as 0
//var globMax = 10; //Note: Must fill in amount of arrays until I can figure out reference to index...
var jwinvDelay = 3000; //Time to rotate each splash
var jwsplashNumber = 0; //DNC!
	

/* function newGlobRand()
{

var oldRand = globRand;
var globRand = Math.round(Math.random()*globMax);


if (globRand != oldRand) return globRand;
else if ((globRand+1) != globMax) return globRand++;
else if (!(globRand-1) < 0) return globRand--;
else return 0;

}
*/
	  
//Updated Sept. 2 2004 to show images sequentially instead of randomly, GG

function jwwriteNewSplash()
{
	
	if (jwsplashNumber == jwSplashArray.length)
	{
		jwsplashNumber = 0;
	}
	
	if (!isMSIE()) {
		
		document.getElementById("jw").innerHTML = jwSplashArray[jwsplashNumber];
		jwsplashNumber++;
		
	}
	
}



//writeNewSplash(); //first call
var jwinterval = setInterval('jwwriteNewSplash()',jwinvDelay);


function montreal_popup() 
{

	if(parseInt(navigator.appVersion)>3) {
	
	

		window.open("montreal_popup.php","montreal_popup","width=700,height=450,scrollbars=1,status=0");

	} else {

	 alert("You are not running a version 5 or higher browser or have 'Javascript' or 'popups' blocked.\n\nPlease enable JavaScript or disable your 'popup blocker software'.");

	 window.focus();

	}

}

function flashPaperPlayer(cataloguename)
{
	
//added September 16, 2005 - gord.at.waddingtons.ca
//load the catalogue in a new window with FlashPaper

window.onerror = null;

var flash=window.open("","Catalogue","width=750,height=840,scrollbars=0,status=0,resizable=1");
flash.document.open();
flash.document.write("<html><head>\n");
flash.document.write("<title>Waddington's&trade; - Flash Catalogue</title>\n");
flash.document.write("<body>");
flash.document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"720\" height=\"765\">");
flash.document.write("  <param name=\"movie\" value=\"http://www.waddingtons.ca/media/flashcatalogues/" +cataloguename+ ".swf\">");
flash.document.write("  <param name=\"quality\" value=\"high\">");
flash.document.write("  <embed src=\"http://www.waddingtons.ca/media/flashcatalogues/" +cataloguename+ ".swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"720\" height=\"765\"></embed>");
flash.document.write("</object>");
flash.document.write("<br><br><div align='center'><a href='http://www.macromedia.com/go/getflashplayer'>Catalogue not visible? Get Flash player.</a></div><img src='http://www.waddingtons.ca/downloadflash.php?file=" +cataloguename+ "_flash' width='1' height='1' border='0'>");
flash.document.write("</body></html>");
flash.document.close();
flash.focus();


	
}
