	
	var HTSK_popup;

	function openWindow( photoURL, windowWidth, windowHeight, windowTitle ) {

		if ( HTSK_popup ) {
		 HTSK_popup.close();		
		}

		if ( windowTitle == '' ) {
			 windowTitle ='HT-sk galÃ©ria';
		}
		
		windowWidth = windowWidth + 0;
		windowHeight = windowHeight + 0;

		HTSK_popup = window.open( photoURL, windowTitle, 'scrollbars=0, width=' + windowWidth + ', height=' + windowHeight + ',resizable=0');
	}
	
	function closeWindow() {
		window.close();
	}

	
	function starter( ) {
		guardValidate();
		setTimeout( 'guardValidate()', 100); 	
	}	

	function guardValidate( ) {

	var errors = 0;
	if ( document.forms.guard ) {

	var formElement = document.forms.guard;

	// how many checked

	if ( formElement.elements.login.value == ''  ) {
		errors++;
	}

	if ( formElement.elements.passwd.value == ''  ) {
		errors++;
	}

	if ( errors == 0 ) {
		formElement.elements.guard_submit.disabled = false;
	}
	else {
		formElement.elements.guard_submit.disabled = true;	
	}
}

}
	
