// JavaScript Document
window.onresize=resizer;
function resizer() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (myHeight<640) {
  	document.getElementById("flash").style.height = "640px";
  } else {
  	document.getElementById("flash").style.height = "100%";
  }
  if (myWidth<1000) {
  	document.getElementById("flash").style.width = "1000px";
  } else {
  	document.getElementById("flash").style.width = "100%";
  }
}

function doOptionSubmit() {
	value = document.formOptions.option.options[document.formOptions.option.selectedIndex].value;
	window.location='/cart.php?action=add&id='+value;
}

function switchPage(menuform) {
	var baseurl = "/" ;
    selecteditem = menuform.toPage.selectedIndex ;
    newurl = menuform.toPage.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      location.href = baseurl + newurl ;
    }
	
}

function boxOn(box,src,frame) {
	document.getElementById(box).style.display='block';
	document.getElementById('fade').style.display='block';
	document.getElementById(frame).setAttribute('src',src);
}
function boxOff(box) {
	document.getElementById(box).style.display='none';
	document.getElementById('fade').style.display='none';
}

function show(id) {
	document.getElementById(id).style.display='block';
}
function hide(id) {
	document.getElementById(id).style.display='none';
}
