function newImage(arg) {

	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function changeImages() {

	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


var preloadFlag = false;


function preloadImages() {

	if (document.images) {
		
//preloads//

		preloadFlag = true;
	}
}


var popTimer=0;
var NumMenus=3;


function show(whichLayer)

{
clearTimeout(popTimer);
hideall();
document.getElementById(whichLayer).style.visibility="visible";
}


function popOut()

{
popTimer=setTimeout('hideall()',400);
}


function hideall()

{
for (i=1; i<=NumMenus; i++)
{
str="Layer"+i;
document.getElementById(str).style.visibility="hidden";
}
}


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);


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Skript für Gallery/solutions Bilder, 0-10=Biology, 11-20=dental, 21-30=material science, 31-40=medical illustration, 41-50=neuroscience //
// gallery 0-10=Biology //
function gallery01()
{
var galleryopen01 = window.open("../html/pic/vm_biology_beetle.htm","galleryopen01","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=600");
galleryopen01.focus();
}

// gallery 11-20=Dental //
function gallery11()
{ 
var galleryopen11 = window.open("../html/pic/vm_dental_ceph_sim.htm","galleryopen11","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=730");
galleryopen11.focus();
}

function gallery12()
{ 
var galleryopen12 = window.open("../html/pic/vm_dental_s_head.htm","galleryopen12","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=595");
galleryopen12.focus();
}

function gallery13()
{ 
var galleryopen13 = window.open("../html/pic/render_william.htm","galleryopen13","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=680,height=620");
galleryopen13.focus();
}

// gallery 21-30=material science, non destructive testing //
function gallery21()
{ 
var galleryopen21 = window.open("../html/pic/vm_material_bmw_box.htm","galleryopen21","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=595");
galleryopen21.focus();
}

function gallery22()
{ 
var galleryopen22 = window.open("../html/pic/vm_material_bmw_box2.htm","galleryopen22","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=595");
galleryopen22.focus();
}

function gallery23()
{ 
var galleryopen23 = window.open("../html/pic/vm_material_car_headlight.htm","galleryopen23","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=850,height=595");
galleryopen23.focus();
}


// gallery 31-40=medical illustration //
function gallery31()
{ 
var galleryopen31 = window.open("../html/pic/render_xvivo.htm","galleryopen31","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=680,height=630");
galleryopen31.focus();
}

function gallery32()
{ 
var galleryopen32 = window.open("../html/pic/vm_lung.htm","galleryopen32","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=680,height=630");
galleryopen32.focus();
}

// gallery 41-50=neuroscience //
function gallery41()
{ 
var galleryopen41 = window.open("../html/pic/vm_neuro_docu.htm","galleryopen41","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=685,height=660");
galleryopen41.focus();
}

function gallery42()
{ 
var galleryopen42 = window.open("../html/pic/vm_neuro_catbrain.htm","galleryopen42","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=680,height=620");
galleryopen42.focus();
}

// Skript für Video/solutions Bilder, 0-10=Biology, 11-20=dental, 21-30=material science, 31-40=medical illustration, 41-50=neuroscience //
// video 0-10=Biology //
function video01()
{
var videoopen01 = window.open("../html/pic/vm_beetle_video.htm","videoopen01","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=780,height=840");
videoopen01.focus();
}

function video02()
{
var videoopen02 = window.open("../html/pic/vm_drosophila.htm","videoopen02","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=750,height=695");
videoopen02.focus();
}

function video03()
{
var videoopen03 = window.open("../html/pic/vm_mouse.htm","videoopen03","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=460,height=480");
videoopen03.focus();
}

// video 11-20=Dental //
function video11()
{
var videoopen11 = window.open("../html/pic/vm_dental_video.htm","videoopen11","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=750,height=680");
videoopen11.focus();
}

// video 21-30=material science //
function video11a()
{
var videoopen11a = window.open("../html/pic/vm_rsna_video.htm","videoopen11a","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=690,height=710");
videoopen11a.focus();
}

// video 31-40=medical illustration //
function video31()
{
var videoopen31 = window.open("../html/pic/vm_medical_blood_flow.htm","videoopen31","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=500,height=580");
videoopen31.focus();
}

function video32()
{
var videoopen32 = window.open("../html/pic/vm_ct_table.htm","videoopen32","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=690,height=700");
videoopen32.focus();
}

function video33()
{
var videoopen33 = window.open("../html/pic/vm_hipbone.htm","videoopen33","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=700,height=660");
videoopen33.focus();
}

function video34()
{
var videoopen34 = window.open("../html/pic/vm_foot_vrml.htm","videoopen34","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=685,height=760");
videoopen34.focus();
}

// Skript für Feature Bilder //
function feature01()
{
var featureopen01 = window.open("../html/pic/feature/vm_feature_mask.htm","featureopen01","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=820,height=570");
featureopen01.focus();
}

function feature02()
{
var featureopen02 = window.open("../html/pic/feature/vm_feature_paint.htm","featureopen02","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=1270,height=640");
featureopen02.focus();
}

function feature03()
{
var featureopen03 = window.open("../html/pic/feature/vm_feature_bbox.htm","featureopen03","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=830,height=570");
featureopen03.focus();
}

function feature04()
{
var featureopen04 = window.open("../html/pic/feature/vm_feature_renderer.htm","featureopen04","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=1060,height=700");
featureopen04.focus();
}

function feature05()
{
var featureopen05 = window.open("../html/pic/feature/vm_feature_measure.htm","featureopen05","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=810,height=560");
featureopen05.focus();
}

function feature06()
{
var featureopen06 = window.open("../html/pic/feature/vm_feature_mesh.htm","featureopen06","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=610,height=685");
featureopen06.focus();
}


// Skript für Tutorial Videos //

function tutorial01()
{
var tutorialopen01 = window.open("../objects/vm_volumepainting.html","tutorialopen01","toolbar=0,location=0,left=250,top=250,directories=0,status=0,menubar=0,scrollbars=1,resizeable=0,width=1065,height=840");
tutorialopen01.focus();
}

// Skript für InquiryFormular //

function chkInquiry () {
  if (document.Inquiry.surname.value == "") {
    alert("Please enter your surname!");
    document.Inquiry.surname.focus();
    return false;
  }
  if (document.Inquiry.first_name.value == "") {
    alert("Please enter your first name!");
    document.Inquiry.first_name.focus();
    return false;
  }
  if (document.Inquiry.email.value == "") {
    alert("Please enter your email address!");
    document.Inquiry.email.focus();
    return false;
  }
  if (document.Inquiry.email.value.indexOf("@") == -1) {
    alert("Please check your email address!");
    document.Inquiry.email.focus();
    return false;
  }
  if (document.Inquiry.comments.value == "") {
    alert("Please enter your comment or question!");
    document.Inquiry.comments.focus();
    return false;
  }
}

// Skript für RegistryFormular //

function chkRegistration () {
  if (document.Registration.surname.value == "") {
    alert("Please enter your surname!");
    document.Registration.surname.focus();
    return false;
  }
  if (document.Registration.first_name.value == "") {
    alert("Please enter your first name!");
    document.Registration.first_name.focus();
    return false;
  }
  if (document.Registration.address.value == "") {
    alert("Please enter your address!");
    document.Registration.address.focus();
    return false;
  }
  if (document.Registration.city.value == "") {
    alert("Please enter the name of your city!");
    document.Registration.city.focus();
    return false;
  }
  if (document.Registration.zip.value == "") {
    alert("Please enter your zipcode!");
    document.Registration.zip.focus();
    return false;
  }
  if (document.Registration.country.value == "") {
    alert("Please enter the name of your country!");
    document.Registration.country.focus();
    return false;
  }
  if (document.Registration.email.value == "") {
    alert("Please enter your email address!");
    document.Registration.email.focus();
    return false;
  }
  if (document.Registration.email.value.indexOf("@") == -1) {
    alert("Please check your email address!");
    document.Registration.email.focus();
    return false;
  }
  if (document.Registration.dg_number.value == "") {
    alert("Please enter your correct dongle number!");
    document.Registration.dg_number.focus();
    return false;
  }
}

// Skript für PurchaseFormular //

function chkPurchase () {
  if (document.Purchase.surname.value == "") {
    alert("Please enter your surname!");
    document.Purchase.surname.focus();
    return false;
  }
  if (document.Purchase.first_name.value == "") {
    alert("Please enter your first name!");
    document.Purchase.first_name.focus();
    return false;
  }
  if (document.Purchase.address.value == "") {
    alert("Please enter your address!");
    document.Purchase.address.focus();
    return false;
  }
  if (document.Purchase.city.value == "") {
    alert("Please enter the name of your city!");
    document.Purchase.city.focus();
    return false;
  }
  if (document.Purchase.zip.value == "") {
    alert("Please enter your zipcode!");
    document.Purchase.zip.focus();
    return false;
  }
  if (document.Purchase.country.value == "") {
    alert("Please enter the name of your country!");
    document.Purchase.country.focus();
    return false;
  }
  if (document.Purchase.email.value == "") {
    alert("Please enter your email address!");
    document.Purchase.email.focus();
    return false;
  }
  if (document.Purchase.email.value.indexOf("@") == -1) {
    alert("Please check your email address!");
    document.Purchase.email.focus();
    return false;
  }
}

