function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

///////////////////////////////////////
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
///////////////////////////////////////

function caseSize() { 
	alert('In order to purchase, click on the "buy" link under <Available Sizes>');
	return false;
}
function caseColor() {
	alert('In order to purchase, click on the "buy" link under <Available Colors>');
	return false;
}
///////////////////////////////////////
function popitup(url)
{
	newwindow=window.open(url,'trackbox','width=400,height=350,top=50,left=50');
	if (window.focus) {newwindow.focus()}
	return false;
}

function popcell(itemimg)
{
	newwindow2=window.open('','itembox','width=400,height=350,top=50,left=50');
	var tmp = newwindow2.document;
	tmp.write('<html><head><title>Larger Image</title>');
	tmp.write('<link rel="stylesheet" href="/style/popup.css">');
	tmp.write('<script>');
	tmp.write('function noContextMenu(e) { return false; }');
	tmp.write('function noClip(e) { if(document.all) { window.clipboardData.setData("Text", ""); } return true; }');
	tmp.write('document.onblur = noClip;');
	tmp.write('document.onmousedown = noRightClick;');
	tmp.write('document.oncontextmenu = noContextMenu;');
	tmp.write('</script>');
	tmp.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
	tmp.write('</head><body  oncontextmenu="return false;" ondragstart="return false"; onblur="return noClip();" onunload="return noClip();"><img src="/images/static/'+itemimg+'" />');
	tmp.write('<br /><div align="center"><a href="javascript:self.close()">close window</a></div>');
	tmp.write('</body></html>');
	tmp.close();
	if (window.focus) {newwindow2.focus()}
	return false;
}
//////////////////////////////////////////////////////////////////////
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//////////////////////////////////////////////////////////////////////
/*
if (document.images) 
{
   img1 = new Image();
   img2 = new Image();
   img1.src = "../images/static/menu_divider_bg.gif";
   img2.src = "../images/static/mogizmo_logo.gif";  
}
*/

//////////////////////////////////////////////////////////////////////

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


/*
//////////////////////////////////////////////////////////////////////

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
*/

//////////////////////////////////////////////////////////////////////
/*
var copyright="Please respect the copyright of this material.";

function noRightClick(e) {
  if (document.layers || document.getElementById && !document.all) {
    if (e.which == 2 || e.which == 3) {
      document.captureEvents(Event.MOUSEDOWN);
//      alert(copyright);
      return false;
    }
  } else if (document.all && !document.getElementById) {
    if (event.button == 2) {
//      alert(copyright);
      return false;
    }
  }
}

function noContextMenu(e) {
  return false;
}

function noClip(e) {
  if(document.all) {
    window.clipboardData.setData("Text", "");
  } 
  return true;
}


document.onblur = noClip;
document.onmousedown = noRightClick;
document.oncontextmenu = noContextMenu;
*/

///////////////////////////////////////
function validateForm(askform)
{
if(""==document.forms.askform.comments.value){
	alert("Any Comments?");
	return false;
}
if(""==document.forms.askform.realname.value) {
	alert("Your Name is Required.");
	return false;
}
if(""==document.forms.askform.email.value) {
	alert("We need your E-mail Address.");
	return false;
}
}
