// JavaScript Document

function MakeArray(n)
{

	this.length=n;
	for(var i=1; i<=n; i++) this[i]=i-1;
	return this
	
}
hex=new MakeArray(16);
hex[1]="0";
hex[2]="1";
hex[3]="2";
hex[4]="3";
hex[5]="4";
hex[6]="5";
hex[7]="6";
hex[8]="7";
hex[9]="8";
hex[10]="9";
hex[11]="A";
hex[12]="B";
hex[13]="C";
hex[14]="D";
hex[15]="E";
hex[16]="F";


function ToHex(x)
{
	x=parseInt(x);
	var high=x/16;
	var s=high+"";
	s=s.substring(0,2);
	high=parseInt(s,10);
	var left=hex[high+1];
	var low=x-high*16;
	s=low+"";
	s=s.substring(0,2);
	low=parseInt(s,10);
	var right=hex[low+1];
	var string=left+""+right;
	return string;

}

function w20()
{
	notif = document.getElementById("secu");
	if ( notif != null ) setTimeout('fadeout(0)',5000);
}
	
function fadeout(y)
{
	notif = document.getElementById("secu");


	if (y<220){
		y = y + 30;
		x = 204 + (y/255)*51 ;
		setTimeout('fadeout('+y+')',100);
		notif.style.backgroundColor = "#"+ ToHex(x) + ToHex(y) + ToHex(y);
	}else{
		notif.style.display = "none";
	}

}

function stripslashes(str)
{
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\\\/g,'\\');
	str=str.replace(/\\0/g,'\0');
	return str;
}


