// JavaScript Document



  

addLoadEvent( 
	function() {
		if ( document.getElementById && document.getElementById('Fusername') ) {
			document.getElementById('Fusername').onfocus = function(){
				if(document.getElementById('Fusername').value == 'username'){
					document.getElementById('Fusername').value = '';
				}
			};
		}
	}
);

addLoadEvent( 
	function() {
		if ( document.getElementById && document.getElementById('Fpassword') ) {
			document.getElementById('Fpassword').onfocus = function(){
				if(document.getElementById('Fpassword').value == 'password'){
					//document.getElementById('Fpassword').type = 'password';
					document.getElementById('Fpassword').value = '';
					
				}
			};
		}
	}
);


addLoadEvent( 
	function() {
		if ( document.getElementById && document.getElementById('cities') ) {
		
			document.getElementById('cities').onchange = function(){
				if(document.getElementById('cities').value){
					
					document.location = "/events/"+document.getElementById('cities').value;
					
				}
			};
					
				
		
		}
	}
);



addLoadEvent( 
	function() {
		
		MM_preloadImages(
			'/img/header/topleft/over/home_over.gif',
			'/img/header/topleft/over/contact_over.gif',
			'/img/header/topleft/over/about_over.gif',
			'/img/header/topleft/over/rss_over.gif',
			'/img/header/main_nav/off/features_off.gif',
			'/img/header/main_nav/off/music_off.gif',
			'/img/header/main_nav/off/art_off.gif',
			'/img/header/main_nav/off/film_off.gif',
			'/img/header/main_nav/off/science_off.gif',
			'/img/header/main_nav/off/sport_off.gif',
			'/img/header/main_nav/off/columns_off.gif',
			'/img/header/main_nav/off/books_off.gif',
			'/img/header/main_nav/off/fiction_off.gif',
			'/img/header/main_nav/off/poetry_off.gif',
			'/img/boxes/store/store_over.gif',
			'/img/boxes/contributors/contributors_over.gif',
			'/img/boxes/news/news_over.gif',
			'/img/boxes/linkage/linkage_over.gif',
			'/img/boxes/events/events_over.gif');

	}
);



//on load function
function addLoadEvent( func ) {
	var oldonload = window.onload;
	
	
	
	if ( typeof window.onload != 'function' ) { 
		window.onload = func; 
	} 
	else {
		window.onload = function() {
			if (oldonload) { 
				oldonload(); 
			}
			func();
		}
	}	
}



