function ajax_update(element_id, url, parameter)
{

	var x = new Ajax.Updater(element_id,url, {parameters: parameter});

}


function ajax_update_complete(element_id, url, parameter, complete_function)
{
	var x = new Ajax.Updater(element_id,url, {parameters: parameter , evalScripts: true, onComplete:complete_function});
}

function update_cart_qty(artwork_id, price)
{
	var qty_id = 'qty-' + artwork_id;
	var subtotal_id = 'subtotal-' + artwork_id;
	var qty = document.getElementById(qty_id);
	alert(price);

	ajax_update(subtotal_id, 'update_cart.php', {item_id: artwork_id, qty:qty.value, price:price});
}

function ajax_update2(element_id, url)
{

	var x = new Ajax.Updater('test','aircraft_list.php');

}

function jump_to_page(page, start)
{
	document.jump_to_page.page.value = page;
	document.jump_to_page.start.value = start;
	document.jump_to_page.submit();
}

function Minimize() 
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;

}

function Maximize() 
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}

function Maximize_image(width, height)
{
	
	
}

function redirect_login()
{
	window.location = "http://www.airlinefan.com/member.php";
}

activateMenu = function(nav) {

/* currentStyle restricts the Javascript to IE only */
	if (document.all &&
 document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */

        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
        
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
            
                /* assign the function to the LI */
             	lis[i].onmouseover=function() {	
                
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() {   
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}
