function verberg_status(){
	window.status=" ";
}

function scroll_status (seed) {
        var m11  = "Plamirel b.v. - Tiel   -   tel. 0344 - 622 977";
        var m12  = "  -  Nu ook zwart/wit posters op fluorescerend papier.";
        var m13  = "  -  Zie onze pagina of bel voor meer informatie of stuur ons een email ";
        var m14  = ": ";
        var m15  = "verkoop@plamirel.nl";
        var msg  = m11+m12+m13+m14+m15;
        
        var out = " ";
        var c   = 1;

        if (150 < seed) {
           seed--;
           var cmd="scroll_status(" + seed + ")";
           timerTwo=window.setTimeout(cmd,100);
           }
        else if (seed <= 150 && 0 < seed) {
           for (c=0 ; c < seed ; c++) {
               out+=" ";
               }
           out+=msg;
           seed--;
           var cmd="scroll_status(" + seed + ")";
           window.status=out;
           timerTwo=window.setTimeout(cmd,100);
           }
        else if (seed <= 0) {
           if (-seed < msg.length) {
              out+=msg.substring(-seed,msg.length);
              seed--;
              var cmd="scroll_status(" + seed + ")";
              window.status=out;
              timerTwo=window.setTimeout(cmd,100);
              }
           else {
              window.status=" ";
              timerTwo=window.setTimeout("scroll_status(100)",100);
              }
           }
        }


function Form_Size_Changer(){
	var target=document.forms;
	for (j=0;j<target.length;j++){
		for (i=0;i<target[j].elements.length;i++){
			var multi=target[j].elements[i].size
			if(multi>3){
				var mul=multi/5
				mul+=45
				mul*=0.025
				target[j].elements[i].size*=mul
			}
		}
	}
}

function myPrint() {
     if (window.print) {
         if (confirm("Wilt u deze pagina afdrukken?")) {
             window.print();
         }
     }
 }
	
function init(){
	if(ie){
//		document.forms.search.sear.size="14"
//		document.forms.store.skunum.size="7"
		Form_Size_Changer()
	}
}

function setInputValue(theForm, theName, theValue) {
	var theElement = findElement(theForm, theName);
	theElement.value = theValue;
}

function setSelectDisplay(theForm, theName, theValue) {
	var theElement = findElement(theForm, theName);
	var elementType = theElement.type;
	if (elementType == "select" || elementType == "select-one") {
		for (var j=0; j<theElement.options.length; j++){
			if (theValue == theElement.options[j].value) {
				theElement.options[j].selected=true;
			}  
		}
	}
}

function findElement(theForm, theName) {
	for (var i=0; i<theForm.elements.length; i++) {
		if (theForm.elements[i].name == theName) {
			return theForm.elements[i];
		}
	}
}

function isEmptyValue(theValue) {
	if (theValue.replace(/\s*/g,"").length > 0) {
		return false;
	}
	else {
		return true;
	}
}

function popup(url,wname) {
	pop_window=window.open(url,wname,"height=300,width=600,top=10,left=10,status=no,scrollbars=yes,toolbar=no,menubar=no,location=no,resize=no");
   }



// disable right key

function right(e) {
// var jaar=year(new date())

if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
	alert(" © 1992 - 2010 -  Plamirel b.v. - Tiel ");
	return false;
	}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;


function timerpopups()
{
  window.open ("http://www.plamirel.nl/images/analogeklok.swf", "", "width=maxwidth(),height=maxheight(),links=0,menubar=0");
}	

/***********************************************
* Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function cdtime(container, targetdate){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.currentTime=new Date()
this.targetdate=new Date(targetdate)
this.timesup=false
this.updateTime()
}

cdtime.prototype.updateTime=function(){
var thisobj=this
this.currentTime.setSeconds(this.currentTime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

cdtime.prototype.displaycountdown=function(baseunit, functionref){
this.baseunit=baseunit
this.formatresults=functionref
this.showresults()
}

cdtime.prototype.showresults=function(){
var thisobj=this


var timediff=(this.targetdate-this.currentTime)/1000 //difference btw target date and current date, in seconds
if (timediff<0){ //if time is up
this.timesup=true
this.container.innerHTML=this.formatresults()
return
}
var oneMinute=60 //minute unit in seconds
var oneHour=60*60 //hour unit in seconds
var oneDay=60*60*24 //day unit in seconds
var dayfield=Math.floor(timediff/oneDay)
var hourfield=Math.floor((timediff-dayfield*oneDay)/oneHour)
var minutefield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour)/oneMinute)
var secondfield=Math.floor((timediff-dayfield*oneDay-hourfield*oneHour-minutefield*oneMinute))
if (this.baseunit=="hours"){ //if base unit is hours, set "hourfield" to be topmost level
hourfield=dayfield*24+hourfield
dayfield="n/a"
}
else if (this.baseunit=="minutes"){ //if base unit is minutes, set "minutefield" to be topmost level
minutefield=dayfield*24*60+hourfield*60+minutefield
dayfield=hourfield="n/a"
}
else if (this.baseunit=="seconds"){ //if base unit is seconds, set "secondfield" to be topmost level
var secondfield=timediff
dayfield=hourfield=minutefield="n/a"
}
this.container.innerHTML=this.formatresults(dayfield, hourfield, minutefield, secondfield)
setTimeout(function(){thisobj.showresults()}, 1000) //update results every second
}

/////CUSTOM FORMAT OUTPUT FUNCTIONS BELOW//////////////////////////////

//Create your own custom format function to pass into cdtime.displaycountdown()
//Use arguments[0] to access "Days" left
//Use arguments[1] to access "Hours" left
//Use arguments[2] to access "Minutes" left
//Use arguments[3] to access "Seconds" left

//The values of these arguments may change depending on the "baseunit" parameter of cdtime.displaycountdown()
//For example, if "baseunit" is set to "hours", arguments[0] becomes meaningless and contains "n/a"
//For example, if "baseunit" is set to "minutes", arguments[0] and arguments[1] become meaningless etc


function formatresults(){
if (this.timesup==false){//if target date/time not yet met
var displaystring=arguments[0]+" days "+arguments[1]+" hours "+arguments[2]+" minutes "+arguments[3]+" seconds left until March 23, 2009 18:25:00"
}
else{ //else if target date/time met
var displaystring="Future date is here!"
}
return displaystring
}

function formatresults2(){
if (this.timesup==false){ //if target date/time not yet met
var displaystring="<span class='lcdstyle'>"+arguments[0]+" <sup>days</sup> "+arguments[1]+" <sup>hours</sup> "+arguments[2]+" <sup>minutes</sup> "+arguments[3]+" <sup>seconds</sup></span>"
}
else{ //else if target date/time met
var displaystring="" //Don't display any text
alert("Christmas is here!") //Instead, perform a custom alert
}
return displaystring
}

// MM_functions

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_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_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];}
}

//------------------ sns-bank ------------------------

function changeOver(el)
{
	el.style.background='#E6E6F0';
	el.style.fontWeight='bolder';
	el.style.cursor='hand';
}
function changeOut(el)
{
	el.style.background='#C7DAEB';
	el.style.fontWeight='normal';
	el.style.cursor='default';
}

function IsKoersenVisible(val)
	{	
		if(document.getElementById('tblKoersen').style.display == '')
			document.getElementById('tblKoersen').style.display = 'none';
		else
			document.getElementById('tblKoersen').style.display = '';		
	}

function IsVisible(val)
	{	
		if(document.getElementById(val).style.display == '')
			document.getElementById(val).style.display = 'none';
		else
			document.getElementById(val).style.display = '';		
	}

