




// Main Menu Mouseover Functions

var base= "/images/menus/top_menu/"
var normal = new Array();
var on_mouse_over = new Array();
var images = new Array('about','projects','portfolio','services','contact_us');

// Pre-load Images
if (document.images)
{
	for (i=0; i<images.length; i++)
	{
		normal[i] = new Image;
		normal[i].src = base + images[i] + "_unselected.png"
		on_mouse_over[i] = new Image;
		on_mouse_over[i].src = base + images[i] + "_hover.png";
	}
}


// The functions: first mouseover, then mouseout

function over(no)
{
	if (document.images)
	{
		document.images[images[no]].src = on_mouse_over[no].src
	}
}

function out(no)
{
	if (document.images)
	{
		document.images[images[no]].src = normal[no].src
	}
}


function toggle_box(id) // This Function Hides/Shows an element
{
	// Animation Choices(Appearing): 
	//		show
	//		fadeIn
	//		slideDown
	//		fadeTo(opacity	
	//		Custom(you can make your own jQuery Effects, too).
	// Animation Choices(For Disappearing): 
	//		hide
	//		fadeOut
	//		slideUp
	//		fadeTo(opacity
	//		Custom(you can make your own jQuery Effects, too).
	 var transition_time = 400 // transition time in ms 
	 element = document.getElementById(id)
	 if(element.style.display == "none") // The Element is currently Hidden
		 $(element).slideDown(transition_time) // toggle box using jquery
 	 else // The Element is currently Visible	 
 		 $(element).slideUp(transition_time) // toggle box using jquery
}


function replace_box(id_to_hide, id_to_show) // This function hides the first element and shows the second(which should already be hidden)
{
	// Animation Choices(Appearing): 
	//		show
	//		fadeIn
	//		slideDown
	//		fadeTo(opacity	
	//		Custom(you can make your own jQuery Effects, too).
	// Animation Choices(For Disappearing): 
	//		hide
	//		fadeOut
	//		slideUp
	//		fadeTo(opacity
	//		Custom(you can make your own jQuery Effects, too).
	element_to_hide = document.getElementById(id_to_hide)
	element_to_show = document.getElementById(id_to_show)
	var transition_time = 400 // transition time in ms 
	$(element_to_hide).slideUp(transition_time) // toggle box using jquery
	$(element_to_show).slideDown(transition_time) // toggle box using jquery
}


function focus_input(id) // focus input boxes
{
	document.getElementById(id).className = "selected"
}
function blur_input(id)
{
	document.getElementById(id).className = ""
}