
  
	//Een nieuwe class declareren
	function class1(){
	
	//standard initialisation of testmode
	this.testmode="no";
		
		//declaring the function that will display test messages
		this.display_message = function(msg){
			if(this.testmode=="yes"){
			alert(msg);
			}
		}

		this.rebuild_menu = function(){		
	
			if(document.getElementById('mainlist')){
			this.mainlist_y=document.getElementById('mainlist').offsetTop;
			this.mainlist_height = document.getElementById('mainlist').offsetHeight;
			//positioning the 'extra_menu'
			document.getElementById('extra_menu').style.top = this.mainlist_y + this.mainlist_height + 0 + 'px';
			}
	
			if (document.getElementById('variantlist')){
			//getting height of 'variantlist'
			this.variantlist_height=document.getElementById('variantlist').offsetHeight;
			//positioning the 'variantlist'
			document.getElementById('variantlist').style.top = this.mainlist_height + 20 + 'px';			
			//positioning the 'extra_menu'
			document.getElementById('extra_menu').style.top = this.mainlist_y + this.mainlist_height + this.variantlist_height + 0 + 'px';
			}
			
		
		//now posisition is setted, making 'extra_menu' visuable
		document.getElementById('extra_menu').style.display = 'block';
		}
		
		this.preload_images = function(){		
		this.imageobject= new Image();
		this.imageobject.src = sw.path_to_root+'images/header_bg.gif';
			//loading all section buttons
			for(this.s=1; this.s<=this.num_of_sections; this.s++){
			this.imageobject.src = sw.path_to_root+'images/b_sec_'+sw.id[this.s]+'.png';
			this.imageobject.src = sw.path_to_root+'images/b_sec_'+sw.id[this.s]+'_strong.png';
			this.imageobject.src = sw.path_to_root+'images/b_sec_'+sw.id[this.s]+'_strong2.png';
			//eval("this.b_sec_"+sw.id[this.s]+"=new Image()");
			//eval("this.b_sec_"+sw.id[this.s]+".scr='"+sw.path_to_root+"images/"+sw.id[this.s]+".gif'");
			}
		}
		
		this.check_alt_flash = function(){			
			//in case flash content may not be displayed	
			if(this.required_version==false){
			//switching classes
			switch_class('header_flash', 'header_no_flash');
			}
		}
		
		this.sent_content_to_object = function(object, content){
		document.getElementById(object).innerHTML=content;
		}

		this.build_captcha_field = function(){		
		this.upper_chars = new Array ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
		this.lower_chars = new Array ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
		
		this.all_chars = this.upper_chars.concat(this.lower_chars);
		this.num_of_chars=this.all_chars.length;
		
		var length_of_word=5;
		this.word="";
		this.graphic_word="";
			for(i=0; i<length_of_word; i++){
			var num = Math.floor(this.num_of_chars*Math.random())
			this.word+=this.all_chars[num];
			//finding out if this char is a uppercase
			var extra="";
				//going true the num of upper_chars
				for(c=0; c<this.upper_chars.length; c++){
					if(this.all_chars[num]==this.upper_chars[c]){
					var extra="_caps";
					}
				}
			var current_char=this.all_chars[num].toLowerCase();
			var img="<img src='"+sw.path_to_root+"images/char_"+current_char+extra+".png' />"
			this.graphic_word+=img;
			}
		this.coded=encode64(this.word)
		this.sent_content_to_object("code", this.graphic_word);
		this.sent_content_to_object("code_compare", "<input type='hidden' value='"+this.coded+"' name='code_compare'/>");
		}
	}

//declaring the first instance
var sw = new class1();
//refreshing testmode (value 'yes' will allow several functions to display testmessages)
sw.testmode='no';
