
function applyOnSubmitToForms()
{
    elementsFormLogin = document.getElementById("frmLogin");		
  	elementsFormLogin.onsubmit = function ()
	{	    
		if (!validateLogin(elementsFormLogin))
		{
			return false;
		}			
    }  
        
}

function applyOnFocusToForms()
{
    elementsUser = document.getElementById("liuser");
    elementsPassword = document.getElementById("lipassword");
    	
  	elementsUser.onfocus = function ()
	{	    
		elementsUser.value = '';		
    } 
    
    elementsPassword.onfocus = function ()
	{	    
		elementsPassword.value = '';		
    } 
}

function applyFlashMovies()
{
  	var so = new SWFObject("library/flash/tagdirect/home.swf", "flashheader", "769", "104", "6", "#014171");
    so.addParam("menu", "false");
    so.write("header_flash");
}

// IE5,6 fade and height fix
function fixHeight() {
    var p = document.getElementById("trip_padding");
    var w = document.getElementById("trip_wrapper");
    var f = document.getElementById("trip_fade");       
    var value = 0;
    
    if (f != null && w != null){
        value = (f.clientHeight - w.clientHeight);
        
        if (value >= 0 && f != null && p != null && w != null){
            p.style.paddingTop = value + 'px';
            f.style.top = value + 'px';
            f.style.height = (w.clientHeight - value) + 'px'
        }
    }
}

// load and attach events
addLoadEvent(fixHeight);
addLoadEvent(applyOnSubmitToForms);
addLoadEvent(applyOnFocusToForms);



          