// JavaScript Document
var diz=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');
var word='';
for(i=0;i<5;i++) word+=diz[Math.floor(Math.random()*26)];

function Set_Cookie( name, value, expires, path, domain, secure ){
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );
	
	if ( expires )
	{
	expires = expires * 1000 * 60 * 5
	}
	var expires_date = new Date( today.getTime() + (expires) );
	
	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
	( ( 0 ) ? ";path=" + path : "" ) + 
	( ( 0 ) ? ";domain=" + domain : "" ) +
	( ( 0 ) ? ";secure" : "" );
}

function setValue4word(){
	document.getElementById('codix').innerHTML=word;
	//document.getElementById('vword').value=word;
	var eml=diz[8]+diz[13]+diz[5]+diz[14]+'@hotelkennedy.net';
	document.getElementById('eml').innerHTML=eml
	document.getElementById('mlt').href='mailto:'+eml;
	Set_Cookie( 'vword', word, 1, '/', '/', 0 ) 
}