
/***********************
* Navigation menu 
***********************/

var submenu=new Array()

submenu[1]=''

submenu[2]=''

submenu[3]='<ul><li>+&nbsp<a href="index.php?fuseaction=portfolio.show3d" title="3d">3d</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showbranding" title="branding">branding</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showdrawing" title="drawings">drawing</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showflash" title="flash">flash</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showgraphic" title="graphic">graphic</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showphotos" title="photography">photography</a></li><li>+&nbsp<a href="index.php?fuseaction=portfolio.showweb" title="web">web</a></li></ul>'

submenu[4]=''

submenu[5]='<ul><li>+&nbsp<a href="index.php?fuseaction=about.showprofile" title="profile">profile</a></li><li>+&nbsp<a href="index.php?fuseaction=about.showinside" title="inside">inside</a></li><li>+&nbsp<a href="index.php?fuseaction=about.showwebsite" title="the website">the website</a></li></ul>'

submenu[6]=''


var delay_hide=300

var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""

function showit(which){
	clear_delayhide()
	thecontent=(which==-1)? "" : submenu[which]

	if (document.getElementById||document.all)
		menuobj.innerHTML=thecontent
	
	else if (document.layers){
		menuobj.document.write(thecontent)
		menuobj.document.close()
	}
}

function resetit(e){
	if (document.all&&!menuobj.contains(e.toElement))
		delayhide=setTimeout("showit(-1)",delay_hide)

	else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhide=setTimeout("showit(-1)",delay_hide)
}

function clear_delayhide(){
	if (window.delayhide)
		clearTimeout(delayhide)
}

function contains_ns6(a, b) {
	while (b.parentNode)
		if ((b = b.parentNode) == a)
			return true;
	return false;
}

/***********************
* Validating form
***********************/

function checkform ( form )
{
  var x = document.forms[0].email.value;
  var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

  // ** START **
  if (form.name.value == "") {
    alert( "Please enter your full name." );
    form.name.focus();
    return false ;
  }

  if (form.email.value == "") {
    alert( "Please enter your email address." );
    form.email.focus();
    return false ;
  }

  if (filter.test(x))
		 if (form.message.value == "") {
			alert( "Please type your message." );
			form.message.focus();
			return false ;
		  } 
		  else {
			return true ;
		  }
  else {
  	alert(form.email.value  + " is not a valid email address. \nPlease enter again.");
    form.email.focus();
    return false ;
  }

// ** END **

  return true ;
}

/***********************
* Display Time and Date 
************************/

// mouse over image
function makevisible(cur,which){
	strength=(which==0)? 1 : 0.5

	if (cur.style.MozOpacity)
		cur.style.MozOpacity=strength
	else if (cur.filters)
		cur.filters.alpha.opacity=strength*100
}


// Showing date
  today = new Date();
  day=today.getDate();
  year=today.getYear()
  hours=today.getHours();
  minutes=today.getMinutes();
  seconds=today.getSeconds();

  if (minutes<=9)
  	minutes="0"+minutes
  if (seconds<=9)
  	seconds="0"+seconds
	  months= new 	Array("January","February","March","April","May","June","July","August","September","October","November","December");
  days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  dayText=days[today.getDay()];
  monthText=months[today.getMonth()];
  



