// JavaScript Document
function doPic(imgName) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
}
function fSizeChart(){
window.document.displaypic.src="images/sizechart.jpg";
window.document.displaypic.title="shoe size conversion chart";
window.document.displaypic.ondblclick = function()
		{
		window.document.displaypic.src="images/cover.png";	
		}	
}
var ie=document.all;
var nn6=document.getElementById&&!document.all;
var isdrag=false;
var x,y;
var dobj;
function movemouse(e)
{
  if (isdrag)
  {
    dobj.style.left = nn6 ? tx + e.clientX - x+"px" : tx + event.clientX - x+"px";
    dobj.style.top  = nn6 ? ty + e.clientY - y+"px" : ty + event.clientY - y+"px";
    return false;
  }
}
function selectmouse(e)
{
  var fobj       = nn6 ? e.target : event.srcElement;
  var topelement = nn6 ? "HTML" : "BODY";
  while (fobj.tagName != topelement && fobj.className != "dragme")
  {
    fobj = nn6 ? fobj.parentNode : fobj.parentElement;
  }
  if (fobj.className=="dragme")
  {
    isdrag = true;
    dobj = fobj;
    tx = parseInt(dobj.style.left+0,10);
    ty = parseInt(dobj.style.top+0,10);
    x = nn6 ? e.clientX : event.clientX;
    y = nn6 ? e.clientY : event.clientY;
    document.onmousemove=movemouse;
    return false;
  }
}
document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");
var paymentInfo ="<b>Secure Payment Gateway</b>&nbsp;(for online shopping)<br /><br />We use Paypal as the gateway to receive payments worldwide.<br />With this service,even you do not have a Paypal account,you can still pay us by credit cards(Visa,Master and American Express) and bank transfers in 18 currencies without leaving us any banking information.It is easier,faster and safer.Paypal is one of the most leading gateways protecting both buyers and sellers dealing online.";
var keywordInfo = "Brand name,style name or style number will be the best keywords for a quick find.";
var forumInfo = "The forum is currently under maintenance.Thanks for your visit and please come back later:)";
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
var CanadaPostStrikeNotice = "Our storefront on W Broadway is closed permanently.<br /><br />Thank you for your support for the passed 5 years.<br /><br />To improve the performance, our headquarter is moving to Ontario, and our American branch is being set up in Michigan.<br /><br />As we are making a significant change, we appreciate all your understandings to any inconvenience caused.<br /><br />Updated "+month + "/" + day + "/" + year;
var pictures = new Array
(
"images/flat.jpg",
"images/zero.jpg",
"images/secure.jpg"
);
//var titles = new Array("Online discount","Flat shipping fee","No exchange & return fee");
var notes = new Array
(
"<b>Flat Shipping Rate</b><br /><br />We offer very competitive rates for shipping worldwide. There are two kinds of flat rate for different purposes:<br /><br />1. Easy Way - CAD10.00/Per Item:<br />When this way is chosen,a freight of CAD10.00 will be added to every item you add in your shopping cart.<br /><br />2. Best Way - CAD25.00/In Total:<br />Regardless the quantity of your purchase,for example,you might buy 4 pairs of shoes and 2 handbags in one purchase,the shipping fee is fixed at CAD25.00;<br /><br />To serve you better,we always select the reliable courriers and faster ways to ship out the products.For example,we normally ship to customers in the U.S. and Canada using Expedited Parcel by Canada Post, it is online trackable and only takes about 1 to 7 business day for delivery.",
"<b>Zero Exchange &amp; Return Fee</b> (For web user only)<br /><br />Within 7 business days of receipt of your order for non sale products, for any reason, you are allowed to send the products under unused condition(including products and packing materials) back to us on your cost for either of:<br /><br />1. A full refund except the flat shipping fee you had paid for the order;<br /><br />2. Exhange for other products with same value. In this case,you need to send us the same flat shipping fee as your original order by cheque or by contacting our customer service.<br /><br />There is no any exchange &amp; return fee.",
"<b>Secure Online Payment</b>&nbsp;<br /><br />We use Paypal as the gateway to receive payments worldwide.<br />With this service, even you do not have a Paypal account, you can still pay us by credit cards(Visa,Master and American Express) and bank transfers in 18 currencies without leaving us any banking information. Paypal is one of the most leading gateways protecting both buyers and sellers dealing online. It is easier, faster and safer."
);
var picture_num = 0;
var current_picture = new Image();
current_picture.src = pictures[picture_num];
function displayTextWithBg(position,comments)
{
			var positionId = position;
			var text = comments;
			the_body = document.getElementById(positionId);
			table = document.createElement('table');
			tbody = document.createElement('tbody');
			first_row = document.createElement('tr');
				first_row_cols1 = document.createElement('td');
				first_row_topleft = document.createElement('img');
				first_row_topleft.src ='images/tl.png';
				first_row_topleft.className = "corner";
				first_row_cols1.appendChild(first_row_topleft);
				first_row.appendChild(first_row_cols1);
				first_row_cols2 = document.createElement('td');
				first_row_cols2.className = 'topmid';
				first_row.appendChild(first_row_cols2);
				first_row_cols3 = document.createElement('td');
				first_row_topright = document.createElement('img');
				first_row_topright.src ='images/tr.png';
				first_row_topright.className = "corner";
				first_row_cols3.appendChild(first_row_topright);
				first_row.appendChild(first_row_cols3);
			tbody.appendChild(first_row);
			second_row = document.createElement('tr');
				second_row_cols1 = document.createElement('td');
				second_row_cols1.className ='leftside';
				second_row.appendChild(second_row_cols1);
				second_row_cols2 = document.createElement('td');
				second_row_cols2.className = 'info';
				second_row_cols2.innerHTML= text;
				second_row.appendChild(second_row_cols2);
				second_row_cols3 = document.createElement('td');
				second_row_cols3.className = 'rightside';
				second_row.appendChild(second_row_cols3);
			tbody.appendChild(second_row);
			third_row = document.createElement('tr');
				third_row_cols1 = document.createElement('td');
				third_row_bottomleft = document.createElement('img');
				third_row_bottomleft.src ='images/bl.png';
				third_row_bottomleft.className = "corner";
				third_row_cols1.appendChild(third_row_bottomleft);
				third_row.appendChild(third_row_cols1);
				third_row_cols2 = document.createElement('td');
				third_row_cols2.className = 'bottommid';
				third_row.appendChild(third_row_cols2);
				third_row_cols3 = document.createElement('td');
				third_row_bottomright = document.createElement('img');
				third_row_bottomright.src ='images/br.png';
				third_row_bottomright.className = "corner";
				third_row_cols3.appendChild(third_row_bottomright);
				third_row.appendChild(third_row_cols3);
		     tbody.appendChild(third_row);
			table.appendChild(tbody);
			table.setAttribute("border", "0");
			table.setAttribute("cellSpacing","0");
			table.setAttribute("cellPadding","0");
			the_body.appendChild(table);
		}
		
function start_show() 
	{
	slideshow();
	// Time is in seconds X 1000
	t = setInterval("slideshow()", 1500);
	}
function slideshow() 
	{
	fClearContent('content');
	obj = document.createElement('img'); 
	picture_num++;
		if (picture_num == pictures.length) 
		{
		picture_num = 0;
		}
	current_picture.src = pictures[picture_num];
	obj.src = current_picture.src;
	obj.style.cursor = "pointer";
	obj.title = "Click for details";
	obj.onmouseover = function()
		{
			clearTimeout(t);
		}
	obj.onclick = function()
		{
			fClearContent('output');
			displayTextWithBg('output',notes[picture_num]);
		}
	obj.onmouseout = function()
			{
			fClearContent('output');
			t = setInterval("slideshow()", 1500);
			}
		document.getElementById('content').appendChild(obj);
	}
function fClearContent(content)
{	
	var mycontent = content;
 	var elem; 
	if (elem = document.getElementById(mycontent)) 
	{ 
	 while (elem.hasChildNodes()) 
	  elem.removeChild(elem.lastChild); 
	} 
}
//slide show for the right bar
var pictures_right = new Array
// List all the pictures in the slideshow here
(
"images/samplesale3.jpg"
);
//var titles_right = new Array("Sample sale","Online discount","Pickup in store");
var notes_right = new Array(	
							
"<b>Sample Sale</b> (for physical store only)<br /><br />We have over 400 pairs of sample shoes for sale in our physical store.These sample shoes are wonderful and in very good deals. They are all from Europe and very well made for promotional purposes.The styles vary from sandals,pumps,walking shoes...to boots and most of them are for next season.The regular prices for these styles are between CAD120.00 and CAD260.00,now we have their samples sale for only CAD49.99 to CAD129.99.<br /><br />Get them earlier but pay less,why wait?<br /><br />***&nbsp;Please be advised that the sample shoes are all in one size:<br />EU 37 or UK 4.5,equivalent to US 6.5 or US 7."
);
var picture_right_num = 0;
var current_picture_right = new Image();
current_picture_right.src = pictures_right[picture_right_num];
function start_show_right() 
	{
	slideshow_right();
	// Time is in seconds X 1000
	s = setInterval("slideshow_right()", 3000);
	}
function slideshow_right() 
	{
	fClearContent('content_right');
	obj = document.createElement('img'); 
	picture_right_num++;
		if (picture_right_num == pictures_right.length) 
		{
		picture_right_num = 0;
		}
	current_picture_right.src = pictures_right[picture_right_num];
	obj.src = current_picture_right.src;
	obj.style.cursor = "pointer";
	obj.title = "Click for details";
	obj.onmouseover = function()
		{
			clearTimeout(s);
		}
	obj.onclick = function()
		{	
			fClearContent('output');
			displayTextWithBg('output',notes_right[picture_right_num]);
		}
	obj.onmouseout = function()
			{
			fClearContent('output');
			s = setInterval("slideshow_right()", 3000);
			}
		document.getElementById('content_right').appendChild(obj);
	}
function displayMap()
{
	obj = document.createElement('img');
	obj.src = 'images/shoefansmap.png';
	obj.id = 'shoefansmap';
	document.getElementById('shoefansmap').appendChild(obj);
}
function displayFront()
{
	obj = document.createElement('img');
	obj.src = 'images/shoefansfront.png';
	obj.id = 'shoefansfront';
	document.getElementById('shoefansfront').appendChild(obj);
}
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

