function showProductInfo(theId, theLang, theSpecsNum) {
	w_width = 600;
	w_height = 550;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = 'templates/ws_mm_products_20/showspecs.php?pageid=' + theId + '&lang=' + theLang + '&specsnum=' + theSpecsNum;
  window.showProductSpecsInfoWindow = open(fparam, 'showProductSpecsInfoWindow', theWindowParam);
	setTimeout('if(showProductSpecsInfoWindow&&!showProductSpecsInfoWindow.closed)showProductSpecsInfoWindow.focus()',100);
}
function ShowPhotoSrc(theId, thePhoto) {
	document.getElementById(theId).src = thePhoto;
}
function HideThumbPhoto(theId) {
	document.getElementById(theId).src = 'layout/images/blank.gif';
}
function photoGallery(theId, theLang) {
	w_width = 700;
	w_height = 620;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = 'templates/ws_mm_products_20/showphotogallery.php?pageid=' + theId + '&lang=' + theLang;
  window.photoGalleryWindow = open(fparam, 'photoGalleryWindow', theWindowParam);
	setTimeout('if(photoGalleryWindow&&!photoGalleryWindow.closed)photoGalleryWindow.focus()',100);
}
function showEnquiry(theId, theLang) {
	w_width = 510;
	w_height = 490;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = 'templates/ws_mm_products_20/showenquiry.php?pageid=' + theId + '&lang=' + theLang;
  window.showEnquiryWindow = open(fparam, 'showEnquiryWindow', theWindowParam);
	setTimeout('if(showEnquiryWindow&&!showEnquiryWindow.closed)showEnquiryWindow.focus()',100);
}
function ValidateProductEnquiryForm (form) { // Used in Give us your feedback page (pageid=5&ctype=bm)
  var fname = form.fullname.value;   
  var email = form.email.value;

  if (!fname)	{
    alert("You must enter your full name.");
    return false;
	} else if (!email) {
		alert("You must enter your email.");
		return false;
	} else if ((email.indexOf('@') == -1) || (email.indexOf('.') == -1)) {
		alert("Wrong email format.");
		return false;
	} else {
		return true;
	}
}

