﻿function findLoaded()
{
	parent.document.getElementById('idZoom').style.visibility='visible'

}



function PageLoad()
	{
		if (window.Event) {
		document.captureEvents(Event.MOUSEMOVE)
		}
		document.onmousemove = getCursorXY;
	}

function getCursorXY(e) 
	{
		cursorX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
		cursorY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
	}

function zoomImage(iProduct)
	{
		//document.getElementById('cntBody').style.backgroundColor  = '#cccccc';
		document.getElementById('cntBody').style.MozOpacity =.3;
		document.getElementById('cntBody').style.filter='alpha(opacity=70)';
		
		
		var luurl
		
		luurl= 'm_product_zoom.asp?i=' + iProduct;
		//document.getElementById('idZoom').style.top=cursorY+'px';
		document.getElementById('idZoom').style.top='250px';
		document.getElementById('idZoom').src=luurl;
		document.getElementById('idZoom').style.display = 'block';
		
		//document.getElementById('idZoomPage').style.opacity == 1;
		//document.getElementById('idZoomPage').style.MozOpacity=1;
		//document.getElementById('cntClose').style.MozOpacity=1;
		//document.getElementById('cntClose').style.opacity = 1;
	}

function closeZoom()
	{
	parent.document.getElementById('idZoom').style.visibility='hidden';
	document.getElementById('idZoomPage').style.visibility='hidden';
	document.getElementById('cntClose').style.visibility='hidden';
	document.getElementById('imgClose').style.visibility='hidden';
	document.getElementById('cntZoom').style.visibility='hidden';
	parent.document.getElementById('cntBody').style.MozOpacity = 1;
	parent.document.getElementById('cntBody').style.filter='alpha(opacity=100)';
	}
	
	
function confirmDelete(delUrl) 
	{
		 if (confirm('Are you sure you want to delete this record?')) 
		 {
			document.location = delUrl;
		  }
	}

function goto(href)
	{
		document.location.href = href// + '.asp'
	}
	
function getServiceItem(id)
	{
		//document.location.href = 'm_service.asp?s=' + id
		
		switch(id) {
		case 1: document.location.href = 'Ready-To-Wear';
		case 2: document.location.href = 'Made-To-Measure';
		case 3: document.location.href = 'Bespoke';
		case 4: document.location.href = 'Formal-Hire';
		case 5: document.location.href = 'Shirts';
		}
		
		
		
		
	}
	
function getProductItem(id)
	{
		document.location.href = 'm_product.asp?p=' + id
	}
	

function IsNumeric(strString) //  check for valid numeric strings	
	   {
	   var strValidChars = "0123456789.-";
	   var strChar;
	   var blnResult = true;

	   if (strString.length == 0) return false;

	   //  test strString consists of valid characters listed above
	   for (i = 0; i < strString.length && blnResult == true; i++)
	      {
	      strChar = strString.charAt(i);
	      if (strValidChars.indexOf(strChar) == -1)
	         {
	         blnResult = false;
	         }
	      }
	   return blnResult;
	   }
	
	// link tracking w/o displaying counter
	//function init()  
	//{
	//	document.getElementById("google-link").onclick=function(e) {
	//		jx("counter.asp?url="+escape("http://www.google.com/")); 
	//	}
	//}
	//window.onload=init;
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus