// JavaScript Document
bsiteSpecific = true;

var descriptionArray = [	'Description goes here' ];

var imageArray		= [ [	'Watches', descriptionArray[0], 'watches.gif', 98, 74, 'cnv56200015_hires.jpg', 400, 468], 
							 [	'Vase', descriptionArray[0], 'vase.gif', 85, 113, 'cnv56200021_hires.jpg', 400, 597], 
						  	 [	'Silverware', descriptionArray[0], 'silverware.gif', 98, 74, 'swbaby1_hires.jpg', 400, 426],
						  	 [	'Jug', descriptionArray[0], 'jug.gif', 98, 121, 'swbaby1_hires.jpg', 400, 426],
						  	 [	'Jewellery', descriptionArray[0], 'jewellery.gif', 98, 74, 'swbaby1_hires.jpg', 400, 426],
						  	 [	'medals', descriptionArray[0], 'medals.gif', 98, 74, 'swbaby1_hires.jpg', 400, 426] ];
	
function ssGallery(start, imagePath) {
	var returnString = '';
	
	returnString = returnString + '<table width="100%" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-COLLAPSE: collapse; BORDER-RIGHT-WIDTH: 0px">' +
										   '<tr>' +
										   '<td align="center" valign="middle">' +
		 								   '<a href="#" alt="' + imageArray[start][1] + '" title="' + imageArray[start][1] + '">' +
										   '<img src="' + imagePath + imageArray[start][2] + '" width="' + imageArray[start][3] + '" height="' + imageArray[start][4]+ '" border="0">' +
 										   '<\/a>' +
										   '<\/td>' +
										   '<td align="center" valign="middle">' +
		 								   '<a href="#" alt="' + imageArray[start + 1][1] + '" title="' + imageArray[start + 1][1] + '">' +
										   '<img src="' + imagePath + imageArray[start + 1][2] + '" width="' + imageArray[start + 1][3] + '" height="' + imageArray[start + 1][4]+ '" border="0">' +
 										   '<\/a>' +
										   '<\/td>' +
										   '<td align="center" valign="middle">' +
		 								   '<a href="#" alt="' + imageArray[start + 2][1] + '" title="' + imageArray[start + 2][1] + '">' +
										   '<img src="' + imagePath + imageArray[start + 2][2] + '" width="' + imageArray[start + 2][3] + '" height="' + imageArray[start + 2][4]+ '" border="0">' +
 										   '<\/a>' +
										   '<\/td>' +
										   '<\/tr>' +
										   '<tr>' +
										   '<td style="text-align: center">' +
										   '<br>' +
										   '<a href="#" alt="' + imageArray[start][1] + '" title="' + imageArray[start][1] + '">' +
										   '<span style="font-size: smaller;">' + imageArray[start][0] + '<\/span>' +
										   '<\/a>' +
										   '<\/td>' +
										   '<td style="text-align: center">' +
										   '<br>' +
										   '<a href="#" alt="' + imageArray[start + 1][1] + '" title="' + imageArray[start + 1][1] + '">' +
										   '<span style="font-size: smaller;">' + imageArray[start + 1][0] + '<\/span>' +
										   '<\/a>' +
										   '<\/td>' +
										   '<td style="text-align: center">' +
										   '<br>' +
										   '<a href="#" alt="' + imageArray[start + 2][1] + '" title="' + imageArray[start + 2][1] + '">' +
										   '<span style="font-size: smaller;">' + imageArray[start + 2][0] + '<\/span>' +
										   '<\/a>' +
										   '<\/td>' +
										   '<\/tr>' +
										   '<\/table>';
  return returnString;																
}

function ssPopupWindow(i, pageName, imagePath) {
	var array;
  switch (pageName) {
  case 'sculpture':
	  array = sculptureArray;
  	break;
 	case 'illustration':
	  array = illustrationArray;
		break;
 	case 'ceramics':
	  array = ceramicsArray;
		break;
  }
	var borderSize = 20;
  var openWin = this.open('', 'ssPopupWindow', 'dependant=Yes, toolbar=No, menubar=No, location=No, scrollbars=Yes, resizable=No, status=No, width=' + (array[i][6] + (borderSize * 4)) + ', height=' + screen.availHeight + ', left=' + screen.availLeft + ', top=' + screen.availTop + ', ');
  writePage(openWin, array[i], imagePath);
  return;
		
  function writePage(openWin, elementArray, imagePath) {
    var doc = openWin.document;
		doc.write('<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN">');
    doc.write('<html><head><title>' + elementArray[0] + '<\/title><link href="..\/css\/main.css" rel="stylesheet" type="text\/css"><\/head>');
		doc.write('<body onBlur="Javascript: self.focus()">');
		doc.write('<table width="100%">');
		doc.write('<tr>');
		doc.write('<td><\/td>');
		doc.write('<td width="' + (elementArray[6] + (borderSize * 2)) + '" class="large" style="text-align: center;">');
    doc.write(elementArray[0]);
		doc.write('<\/td>');
		doc.write('<td><\/td>');
		doc.write('<\/tr>');
		doc.write('<tr>');
		doc.write('<td><\/td>');
		doc.write('<td class="graphicbig" height="' + (elementArray[7] + (borderSize * 2)) + '" style="vertical-align: middle;">');
    doc.write('<center><img src="' + imagePath + elementArray[5] + '" height="' + elementArray[7] + '" width="' + elementArray[6] + '"><\/center>');
		doc.write('<\/td>');
		doc.write('<td><\/td>');
		doc.write('<\/tr>');
		doc.write('<tr>');
		doc.write('<td height="17">');
		doc.write('<\/td>');
		doc.write('<\/tr>');
		doc.write('<tr>');
		doc.write('<td><\/td>');
		doc.write('<td width="' + (elementArray[6] + borderSize) + '" class="graphicbig">');
    doc.write('<p class="text">' + elementArray[1] + '<\/p>');
		doc.write('<\/td>');
		doc.write('<td><\/td>');
		doc.write('<\/tr>');
		doc.write('<tr>');
		doc.write('<td colspan="3">');
    doc.write('<center><br><form><input type="button" value="Close Window" onClick="window.close()"><\/form><\/center>');
		doc.write('<\/td>');
		doc.write('<\/tr>');
		doc.write('<\/table');
		doc.write('<\/body><\/html>');
    doc.close();
  }
}	

function ssNavigationBar(pageName) {
  var leftImageWidth = 0,
			leftImageName = '',
      noLeftImageWidth = 133;

  switch (pageName) {
  case 'sculpture':
		leftImageWidth = 63;
  	leftImageName = 'babyblack.gif';
  	break;
 	case 'illustration':
		leftImageWidth = 96;
  	leftImageName = 'sheepsmall.gif';
		break;
 	case 'ceramics':
		leftImageWidth = 73;
  	leftImageName = 'bowlsblacksmall.gif';
		break;
 	case 'contact':
		leftImageWidth = 60;
  	leftImageName = 'snotsmall.gif';
		break;
  }
	
	var returnString = '';
	
	if (leftImageName.length > 0)
	  returnString = returnString + '<td class="navbar">' +
                                  '<img src="..\/images\/' + leftImageName + '" height="80" width="' + leftImageWidth + '" class="navbar">' +
                                  '<\/td>';
  returnString = returnString + '<td class="navbar">' +
                                '<img src="..\/images\/header.gif" height="40" vspace="30" width="' + (noLeftImageWidth - leftImageWidth) + '">' +
                                '<\/td>' +
                                '<td class="navbar">' +
                     					  '<a href="..\/main.htm" onMouseOut="Javascript: if (bmmTools) MM_swapImgRestore();" onMouseOver="Javascript: if (bmmTools) MM_swapImage(\'btnhome\', \'\',\'..\/images\/btnhome2.gif\', 1);">' +
                  						  '<img src="..\/images\/btnhome1.gif" alt="Tom Heyse-Moore :: Sculpture / Illustration / Ceramics" title="Tom Heyse-Moore :: Sculpture / Illustration / Ceramics" name="btnhome" height="40" vspace="30" width="60">' +
                    						'<\/a>' +
                      					'<\/td>' +
                                '<td class="navbar">' +
                     					  '<a href="..\/sculpture/sculpture.htm" onMouseOut="Javascript: if (bmmTools) MM_swapImgRestore();" onMouseOver="Javascript: if (bmmTools) MM_swapImage(\'btnsculpture\', \'\',\'..\/images\/' + getButtonName('sculpture', pageName, 2) + '\', 1);">' +
                    					  '<img src="..\/images\/' + getButtonName('sculpture', pageName, 1) + '" alt="Tom Heyse-Moore :: Sculpture" title="Tom Heyse-Moore :: Sculpture" height="40" vspace="30" width="105" name="btnsculpture">' +
                    						'<\/a>' +
                      					'<\/td>' +
                                '<td class="navbar">' +
                    					  '<a href="..\/illustration/illustration.htm" onMouseOut="Javascript: if (bmmTools) MM_swapImgRestore();" onMouseOver="Javascript: if (bmmTools) MM_swapImage(\'btnillustration\', \'\',\'..\/images\/' + getButtonName('illustration', pageName, 2) + '\', 1);">' +
                    						'<img src="..\/images\/' + getButtonName('illustration', pageName, 1) + '" alt="Tom Heyse-Moore :: Illustration" title="Tom Heyse-Moore :: Illustration" name="btnillustration" height="40" vspace="30" width="117">' +
                    						'<\/a>' +
                       					'<\/td>' +
                                '<td class="navbar">' +
                     					  '<a href="..\/ceramics/ceramics.htm" onMouseOut="Javascript: if (bmmTools) MM_swapImgRestore();" onMouseOver="Javascript: if (bmmTools) MM_swapImage(\'btnceramics\', \'\',\'..\/images\/' + getButtonName('ceramics', pageName, 2) + '\', 1);">' +
                    						'<img src="..\/images\/' + getButtonName('ceramics', pageName, 1) + '" alt="Tom Heyse-Moore :: Ceramics" title="Tom Heyse-Moore :: Ceramics" name="btnceramics" height="40" vspace="30" width="94">' +
                    						'<\/a>' +
                      					'<\/td>' +
                                '<td class="navbar">' +
                      				  '<a href="..\/contact/contact.htm" onMouseOut="Javascript: if (bmmTools) MM_swapImgRestore();" onMouseOver="Javascript: if (bmmTools) MM_swapImage(\'btncontact\', \'\',\'..\/images\/' + getButtonName('contact', pageName, 2) + '\', 1);">' +
                  						  '<img src="..\/images\/' + getButtonName('contact', pageName, 1) + '" alt="Contact :: Tom Heyse-Moore" title="Contact :: Tom Heyse-Moore" name="btncontact" height="40" vspace="30" width="117">' +
                    						'<\/a>' +
                      					'<\/td>' +
                      			    '<td class="navbar">' +
                    	    			'<img src="..\/images\/header.gif" width="160" height="40">' +
                      					'<\/td>';
  return returnString;
	 
	function getButtonName(currentButton, pageName, topOrBottom) {
		var buttonName = 'btn' + currentButton;
		switch (topOrBottom) {
		case 1:
			if (pageName == currentButton) 
				buttonName += '2'
			else
				buttonName += '1';
			break;
		case 2:
			if (pageName == currentButton) 
				buttonName += '1'
			else
				buttonName += '2';
			break;
		}
		buttonName += '.gif';
		return buttonName;
	}
}

function ssPrivacyPolicy(pathOffset) {
  var borderSize = 20;
  var openWin = this.open('', 'ssPrivacyPolicy', 'dependant=Yes, toolbar=No, menubar=No, location=No, scrollbars=Yes, resizable=No, status=No, width=600, ');
  writePage(openWin, pathOffset);
  return;
		
  function writePage(openWin, pathOffset) {
    var doc = openWin.document;
	doc.write('<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN">');
    doc.write('<html><head><title>ibuyZit Privacy Policy<\/title><link href="' + pathOffset + 'css\/main.css" rel="stylesheet" type="text\/css"><\/head>');
	doc.write('<body onBlur="Javascript: self.focus()" bgcolor="black">');
	doc.write('<img src="' + pathOffset + 'images\/logo.gif"><br><br>');
	doc.write('<h>Privacy Policy<\/h><br><br>');
	doc.write('<p>This privacy policy refers only to www.ibuyzit.com, it does not apply to any other company or company\'s website.<\/p>');
	doc.write('<p>We have a privacy policy because we want you to feel confident about the personal information ibuyZit holds about you. ibuyZit takes all reasonable care to prevent unauthorized access to your personal information.<\/p>');
	doc.write('<p>Personal information is collected from you when you register with ibuyZit, every time you log in and when you sell and item or leave feedback.<\/p>');
	doc.write('<p>Your personal information is not shared with any other individual or organisation.<\/p>');
	doc.write('<p>However, you should be aware that the feedback you leave is visible to other users of the website.<\/p>');
	doc.write('<\/body><\/html>');
    doc.close();
  }
}