// These are the functions for the MOUSEOVERS.


function rollover(roll,over)

{

if (document.images)
{
document[roll].src = eval(over + ".src") 
}

}

// These are the Variables for the Date functions. The document write is in the HTML document.

var now = new Date();
var dayofmonth = now.getDate();
var numberofday = now.getDay();
var numberofmonth = now.getMonth();
var year = now.getFullYear();
var stunde = now.getHours();

var dayofweek = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];

var month = ["January","February","March","April","May","June","July","August","September","October","November","December"];

var quoteofday = ["Never do anything standing that you can do sitting, or anything sitting that you can do lying down.","When planning for a year, plant corn. When planning for a decade, plant trees. When planning for life, train and educate people.","A gem cannot be polished without friction, nor a man perfected without trials.","Experience is a comb which nature gives to men when they are bald.","One never needs their humor as much a when they argue with a fool.","Great souls have wills; feeble ones have only wishes.","Better a diamond with a flaw than a pebble without one."];

// This is the function to check the SUBMISSIONS form

	
function checkfm()
	
	{
	
	if (document.submissions_form.first.value == "")
     {
    	alert("A first name is required. Thank you.")
    	document.submissions_form.first.focus();
    	return false;
    }
		
	
	
	if (document.submissions_form.last.value.length < 2)
     {
    	alert("A last name is required. Thank you.")
    	document.submissions_form.last.focus();
    	return false;
    }
		
	
	var content=document.submissions_form.email.value
	
	if (content.indexOf("@")==-1)
	{
	alert("Please enter a proper email address. Thank you.")
	document.submissions_form.email.focus();
	return false;
	}
	if (content.length <3)
	{
	alert("Please enter a proper email address. Thank you.")
	document.submissions_form.email.focus();
	return false; 
	
	
	}
	
	if (document.submissions_form.address.value.length < 2)
     {
    	alert("I'd like to know where you are from. Thank you.")
    	document.submissions_form.address.focus();
    	return false;
    }
}


// This is the function to check the guestbook!

function checkfm2()
	
	{
	
	if (document.guestbook_form.nick.value == "")
     {
    	alert("I'll need a first name, thank you.")
    	document.guestbook_form.first.focus();
    	return false;
    }
		
	
	
	if (document.guestbook_form.nick.value.length < 2)
     {
    	alert("A nick name is required, thank you.")
    	document.guestbook_form.last.focus();
    	return false;
    }
		
	
	var content=document.guestbook_form.email.value
	
	if (content.indexOf("@")==-1)
	{
	alert("Please enter a proper email address. Thank you.")
	document.guestbook_form.email.focus();
	return false;
	}
	if (content.length <3)
	{
	alert("Please enter a proper email address. Thank you.")
	document.guestbook_form.email.focus();
	return false; 
	
	
	}
	
	if (document.guestbook_form.country.value.length < 2)
     {
    	alert("I'd like to know where you are from. Thank you.")
    	document.guestbook_form.country.focus();
    	return false;
    }
	if (document.guestbook_form.opinion.value.length < 10)
     {
    	alert("I think an opinion usually contains more than 10 characters!")
    	document.guestbook_form.country.focus();
    	return false;
    }

}


// This is the function to check the CONTACT form

	
function checkfm3()
	
	{
	
	if (document.contact_form.first.value == "")
     {
    	alert("A first name is required. Thank you.")
    	document.contact_form.first.focus();
    	return false;
    }
		
	
	
	if (document.contact_form.last.value.length < 2)
     {
    	alert("A last name is required. Thank you.")
    	document.contact_form.last.focus();
    	return false;
    }
		
	
	var content=document.contact_form.email.value
	
	if (content.indexOf("@")==-1)
	{
	alert("Please enter a proper email address. Thank you.")
	document.contact_form.email.focus();
	return false;
	}
	if (content.length <3)
	{
	alert("Please enter a proper email address. Thank you.")
	document.contact_form.email.focus();
	return false; 
	
	
	}
	
	if (document.contact_form.address.value.length < 2)
     {
    	alert("I'd like to know where you are from. Thank you.")
    	document.contact_form.address.focus();
    	return false;
    }
}



// This is a function to open a new window

function openwindow(content)

{

newwindow = window.open(content, '', config='height=500,width=700,left=120,top=30,resizable=yes,scrollbars=yes,status=no,toolbar=no,location=no,directories=no,menubar=no,copyhistory=no')
newwindow.focus()
}
	
	
// This is the function to open the window with the slide show


function openwindow2(destination)

{

newwindow = window.open(destination, '', config='height=500,width=530,left=150,top=20,resizable=no,scrollbars=no,status=no,toolbar=no,location=no,directories=no,menubar=no,copyhistory=yes')
newwindow.focus()
}

function openwindow3(destination)

{

newwindow = window.open(destination, '', config='height=640,width=810,left=20,top=10,resizable=no,scrollbars=no,status=no,toolbar=no,location=no,directories=no,menubar=no,copyhistory=no')
newwindow.focus()
}


function openwindow4(resume)

{

newwindow = window.open(resume, '', config='height=600,width=800,left=5,top=5,resizable=no,scrollbars=no,status=no,toolbar=no,location=no,directories=no,menubar=no,copyhistory=no')
newwindow.focus()
}


function openwindow5(demoreel)

{

newwindow = window.open(demoreel, '', config='height=600,width=1030,left=5,top=5,resizable=no,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,menubar=no,copyhistory=yes')
newwindow.focus()
}

function openwindow6(demoreel)

{

newwindow = window.open(demoreel, '', config='height=600,width=1050,left=5,top=5,resizable=no,scrollbars=no,status=yes,toolbar=no,location=no,directories=no,menubar=no,copyhistory=yes')
newwindow.focus()
}


function openwindow7(shot_list)

{

newwindow = window.open(shot_list, '', config='height=400,width=600,left=200,top=100,resizable=no,scrollbars=yes,status=yes,toolbar=no,location=no,directories=no,menubar=no,copyhistory=yes')
newwindow.focus()
}

// This is a function to dynamically write a new window and close any
// previous windows. I was able to write the script to open a new window
// using a function, however, the function to close the previous window
// using: - if (newWindow && !newWindow.closed) - to check if a window
// is opened, I cut and pasted. Thus the comments below are not mine.


// window.name will name the window that is opening the child window so we can reference it with targets
// from the child window

// NOTE!!! This doesn't work with Frames because any link will open a new window. Since I don't need 
// to reference my parent window from the child window I just commented it out.

// window.name="popup";

// you need to initialize your object called newWindow as null so it exists before you
// test for it see support url for more info


newWindow = null;

// this function will test to see if the window exists and to see if it is not closed

function closewindow()

{  

// this is statement checks the following. It looks to see if newWindow exists
// And checks to see if newWindow is Not Closed the two && signs means it must
// meet both criteria.

 if (newWindow && !newWindow.closed)
 
  {
  
  // if the window is open and meets the criteria just above here it will close
  // the window
  
 newWindow.close()
 
  }

  // I don't find it necessary to tell people here that there is no window 
  // to close - thus the following part of the if statement is commented out
  
  
  // else
  
  // {

  // this will write to the screen the error message
  // the following reference literally means
  // IN the DOCUMENT out of all the ID tags there is one named ALERT and write the text 
  // INSIDE that tag. or THE INNERTEXT of that particular tag named ID
  
  // document.all.message.innerText = ("Sorry there is no Window open")
  
  // }

  
}

function neufenster(article)

{
closewindow()
//document.all.message.innerText = ("")
newWindow = window.open('', '', config='height=500,width=700,top=100,left=100')
//newWindow.document.writeln("<head><title>Reitz Machine</title></head><body leftmargin=0 topmargin=0  marginwidth=0 marginheight=0>")
//newWindow.document.writeln("<table width=600 cellspacing=0 cellpadding=5 border=0><tr><td
//align=center>title/author</td></tr><tr><td align=center>article</td></tr></table></body>")
//newWindow.document.writeln("</body>")
newWindow.focus()


// document.all.message.innerText = ("") sets the message area to blank when the window
// is opened. That way it will erase any message that says there is no window open

}






