/*
versie dd 7-april-2006 Aloude 
versie voor Alphamegahosting
Vanwege gebruik Formmail is in de algemene mailcheckfunctie het volgende aangepast:
(myForm.from.value)=(myForm.email.value)
*/

/*
 functie sorry
 Rechts klikken geeft waarschuwing betreffende copyright
*/


<!-- Begin
var sorry="Copyright BASA WebDesign"
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(sorry);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(sorry);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// End -->



/*
 functie openwindow
 Maakt een nieuw window van een ingestelde grootte en achtergrondkleur voor een image, met of zonder "sluiten" knop
 variabelen: in volgorde: naam bestand_groot,v=verticaal/h=horizontaal/vi=vierkant, an/ad/jv/wi = achtergrondkleur, s/n = sluitknop)
 voorbeeld <a href="javascript:openwindow('images/antiek/meubel/me001_gr.jpg','v','an','s')">
*/

<!-- Begin
var newWind;
var lOpened=false;
function openwindow(cPicture,cSize,cColor,cClose){
		 var output;
		if (lOpened){
		   newWind.close();
		}
		lOpened=true;


if  (cSize == "v"){
     	if (cClose == "s"){
	newWind=window.open("","xxxxx","height=700,width=570,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
        }else {
	newWind=window.open("","xxxxx","height=680,width=570,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
        }
}else if (cSize == "h"){	
    	if (cClose == "s"){
	newWind=window.open("","yyyyy","height=540,width=670,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
      	}else {
	newWind=window.open("","yyyyy","height=520,width=670,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
      	}
}else {	
    	if (cClose == "s"){
	newWind=window.open("","yyyyy","height=690,width=670,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
      	}else {
	newWind=window.open("","yyyyy","height=670,width=670,screenX=5,screenY=5,top=5,left=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
      	}
}
		 output="<head><HTML><title>Antiek 't Aloude</title>"
 		 output+="<script language='JavaScript' src='basastand.js'></script></head>"

		 if  (cColor == "ad"){		
 		     output+="<BODY BGCOLOR='#004400'>"
		 }else if (cColor == "an"){
		     output+="<BODY BGCOLOR='#550000'>"
		 }else if (cColor == "jv"){
		     output+="<BODY BGCOLOR='#3E457C'>"
		 }else {
		     output+="<BODY BGCOLOR='#FCEDC2'>"
		 }
 		 output+="<CENTER><IMG SRC='"+cPicture+"'>"
                 if (cClose == "s"){
		 output+="<FORM><INPUT TYPE='button' VALUE='Sluiten' onClick='self.close()'></FORM>"
		 }
		 output+="</CENTER></BODY></HTML>"
		 newWind.document.write(output);
		 newWind.document.close();
		 newWind.focus();
}
//  End -->

/*
 De volgende twee functies zijn Checkfuncties tbv de mailcontact-bestanden
*/

<!-- Begin
function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("Incorrect E-mail adres! Wijzig dit!")
return (false)
}
//  End -->


<!-- Begin
  function checkCR(evt) {
    var evt  = (evt) ? evt : ((event) ? event : null);
    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
  }
  document.onkeypress = checkCR;
//  End -->


/*
 functie changews()
 aanpassen van windowstatus-tekst
*/

/*
<!-- Begin
	function defstat(){
	window.DefaultStatus=' ';
	return true;
}
	function changews(message) {
  	if (message==null) {message='Aloude voor al uw antiek en art-deco!!!!';}
  	window.status=message;
  	newmessage=message;
  	setTimeout('changews(newmessage)',250);
}
changews()

//  End -->
*/



/*==============================================================================

Parameters:

als time = True, wordt de tijd getoond, als time = False wordt de tijd niet getoond.
Deze tekst in je document op de plaats waar de datum gewijzigd moet komen:
	<script type="text/javascript">writeDateModified (false);</script>
or   
	<script type="text/javascript">writeDateModified (true);</script>

Het kan zijn dat er geen datum doorgegeven wordt door de server, dan wordt de tekst "niet beschikbaar" getoond.
*/

function writeDateModified (time) {
  var days = new Array;                        // Array voor de namen van de dagen
  var months = new Array;                      // Array voor de namen van de maanden
  // Load up day names
  days[0] = "zondag";
  days[1] = "maandag";
  days[2] = "dinsdag";
  days[3] = "woensdag";
  days[4] = "donderdag";
  days[5] = "vrijdag";
  days[6] = "zaterdag";

  // Load up month names
  months[0] = "januari";
  months[1] = "februari";
  months[2] = "maart";
  months[3] = "april";
  months[4] = "mei";
  months[5] = "juni";
  months[6] = "juli";
  months[7] = "augustus";
  months[8] = "september";
  months[9] = "oktober";
  months[10] = "november";
  months[11] = "december";

  // Assign date variables with document.lastModified 
  var modDate = new Date(Date.parse(document.lastModified));
  
  // If we have a valid date reformat it.
  if (modDate != 0 && modDate != "Invalid Date") {
  
    // Set up day variable to hold the name of the day
    var day = days[modDate.getDay()];
    
    // ndate variable holds day of month
    var ndate = modDate.getDate();
    
    // Set up month variable to hold the name of the month
    var month = months[modDate.getMonth()];
    
    // Get the year and if it is less than 1000 add 1900 to it.
    var year = modDate.getYear();
    if (year < 1000) year = year + 1900;
    
    // Load up the time variables if required
    if (time) {
      var hour = modDate.getHours().toString();
      if (hour.length == 1) hour = "0" + hour; 
      var minute = modDate.getMinutes().toString();
      if (minute.length == 1) minute = "0" + minute;
      var second = modDate.getSeconds().toString();
      if (second.length == 1) second = "0" + second;
    }
    
    // Display date and time document was last updated.
    document.write(day + " " + ndate + " " + month + " " + year+ "  ");
    if (time) {
      document.write(hour + ":" + minute + ":" + second);
    }
  }
	else document.write("niet beschikbaar");
}
