/*
  -------------------------------------------------------------------------
	                       Caillou Communications / SiteLabel
						         Center PopUp Window
						       webmaster@sitelabel.com
						     http://www.sitelabel.com
    -------------------------------------------------------------------------  
*/

/*  Open Window Centered by define windows properties with onClick="NewWindow(this.href,'Admin','800','600','yes','center');return false" */

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=50;TopPosition=30}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}


function valButton(btn) {
var cnt = -1;
for (var i=btn.length-1; i > -1; i--) {
   if (btn[i].checked) {cnt = i; i = -1;}
   }
if (cnt > -1) return btn[cnt].value;
else return null;
}

/*
	Copyright 2007 SiteLabel - All rights reserved.
*/

/*
  -------------------------------------------------------------------------
	                       Caillou Communications / SiteLabel
						           Image Preloader
						       webmaster@sitelabel.com
						     http://www.sitelabel.com
    -------------------------------------------------------------------------  
*/

/*  Preload Images */

<!--
function loadimage() { //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=loadimage.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];}}
}
//-->

/*
	Copyright 2007 SiteLabel - All rights reserved.
*/
/*
  -------------------------------------------------------------------------
	                       Caillou Communications / SiteLabel
						           Alert PopUp
						       webmaster@sitelabel.com
						     http://www.sitelabel.com
    -------------------------------------------------------------------------  
*/

/*  Alert PopUp */

<!--
function alertMessage(Alert) { //v1.0
  alert(Alert);
}//-->

/*
	Copyright 2007 SiteLabel - All rights reserved.
*/

/*
	Copyright 2007 SiteLabel - All rights reserved.
*/
/*
  -------------------------------------------------------------------------
	                       Caillou Communications / SiteLabel
						           Staus Bar Text
						       webmaster@sitelabel.com
						     http://www.sitelabel.com
    -------------------------------------------------------------------------  
*/

/*  Status Bar Text */

function statusBarText(stsbartxt) { //v1.0
  status=stsbartxt;
  document.SL_returnValue = true;
}

<!--
function JumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
/*  GO TO URL */

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

        function startCallback() {
document.getElementById('status').innerHTML = '<img src="../../../Picture_Library/uploading.gif" /><br><font size="1" face="Tahoma"><strong>Uploading...</strong></font>'; 
            return true;
        }

        function completeCallback(response) {
            // make something useful after (onComplete)
document.getElementById('status').innerHTML = ''; 
        }


function confirmOrder(){

       msg = "Wilt u zich echt voor deze cursus inschrijven?"
       return confirm(msg);
}
function confirmRemovePic(){

       msg = "Wilt u dit plaatje echt verwijderen?"
       return confirm(msg);
}

function setAddress(Order){
var xmlhttp=false; //Clear our fetching variable
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        }
        var file = 'changeform.php?orderID='; //This is the path to the file we just finished making *
    xmlhttp.open('GET', file + Order, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById('varfields').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                } 
        }
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
return;
}
