
/*****************************************************************************
 *
 *  Copyright              : Copyright (C) FJ Design
 *  Website                : www.fj-design.nl
 *
 *****************************************************************************/

 

function show_box(element){	
	if(this.document.getElementById(element).style.display == 'block'){
		this.document.getElementById(element).style.display = 'none';
	}
	else{
		this.document.getElementById(element).style.display = 'block';	
	}				
}
function Popup(url,width,height,name){
	var winleft = screen.width/2 - width/2 ;
	var wintop =  0;
	winprops = 'height='+height+', width='+width+',top='+wintop+',left='+winleft+',scrollbars=yes,location=no,menubar=no,titlebar=no,status=no,toolbar=no,resizable=no,directories=no'
	win=window.open(url, name, winprops);
 	win.focus();
}
function get_safe(first,second,third,fourth){
	if(fourth!=""){		
		this.document.write('<a class=\"'+third+'\" href=\"mailto:' + first + '@' + second + '\">');
		if(third!=""){
			this.document.write(third + '</a>');		
		}
		else{
			this.document.write(first + '@' + second + '</a>');		
		}
	}
	else{
		this.document.write('<a href=\"mailto:' + first + '@' + second + '\">');
		if(third!=""){
			this.document.write(third + '</a>');		
		}
		else{
			this.document.write(first + '@' + second + '</a>');		
		}
	}		
}
var phone = "-0123456789";
var numb = "0123456789";
var numm = "0123456789.";
var alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
function res(t,v){	
	var w = "";
	for (i=0; i < t.value.length; i++) {
		x = t.value.charAt(i);
		if (v.indexOf(x,0) != -1){
			w += x;
		}	
	}
	t.value = w;
}
function get_content_ajax(div,id,type){
		var value = encodeURIComponent(document.getElementById(id).value); 
		$("#"+div+"").fadeIn("slow");
		$("#"+div+"").load("/incl/inc_check_data.php?id="+id+"&value="+value+"&sort="+type+"");	
}