// 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 pictures = new Array
(
"images/extra.jpg",
"images/pickup.jpg",
"images/flat.jpg",
"images/zero.jpg",
"images/Samplesforsale.jpg",
"images/secure.jpg"
);
//var titles = new Array("Online discount","Flat shipping fee","No exchange & return fee");
var notes = new Array
(
"<b>Extra Online Discount</b><br /><br />We offer an extra online discount to customers who shop on our website. This discount will be applied to the <b>final prices</b> tagged online or in store. The rate of this discount is <b>minimum 10%</b> and could be changed from time to time. For example, if you add the following items to your cart and the current rate is 15%:<br /><br />1 X Shoe-A with regular price $150.00 and sale price $100.00;<br />1 X Handbag-B with regular price $50.00;<br /><br />Then here is what you need to pay before tax (if applicable) and shipping:<br /><br />(1 X 100.00 + 1 X 50.00) X (1 - 15%) = 127.50 <br /><br />Please note that this discount is only showing in your shopping cart under Logged In status.",
"<b>Pickup In Store For No Shipping</b><br /><br />Customers shop online are allowed to pick up the order in our physical store within 5 business days after the order is confirmed by us.<br /><br />To do this, you need to pay the flat shipping fee when you place the order and comment that the order will be picked up in store. When the order is being picked up or returned(non sale product only)in store, a picture identification with the same name and address as what you have registered with us for the order will be required. We will keep a related document with your signature and the copy of your picture identification to close the order.<br /><br />Your payment for the products(if the order is returned) and flat shipping fee will be refunded retroactively within 2 business days after closing the order.<br /><br />Please be advised that we are allowed to ship out your order if it has not been picked up in 5 business days after being confirmed.",
"<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 couriers 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 online shopping 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 />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>Samples for Sale</b> (for our physical store only)<br /><br />Our physical store always carries sample shoes which are wonderful and in very good deals. The samples are all from Europe and very well made for promotional purposes. The styles vary from sandals,pumps,comforts...to boots and most of them are for next season. The regular prices for them 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.",
"<b>Secure Online Payment</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 within an encrypted page (starts with https://) provided by Paypal without disclosure of your 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()", 2000);
	}
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()", 2000);
			}
		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;
}
}
