function init(){
var screenH = screen.height;
    var screenW = screen.width;
    //alert("Your Screen Resolution:n" + screenW + "px x " + screenH + "px");
    if(document.all){
        availW = document.body.clientWidth;
        availH = document.body.clientHeight;
    }else{
        availW = innerWidth; availH = innerHeight;
    }   
}
	  
    
function showHomeDiv(){	
	document.getElementById("entry_firstpost").innerHTML =
		'<h3 class="entrytitle" id="post-3"> Welcome to My Home Page </h3>'
		+   '<div class="entrybody">'
		+   '<br/><p align="left"><img src="/images/homepage_me.JPG" align="right" height="107" width="120" />Hi ! My name is Piyush Hari. I work as a Software Engineer at Oracle USA Inc. My hobbies include pool, playing my guitar and singing. I also do web designing for fun.</p>'
		+'</div></div>';	
}

function showMusicDiv(){	
	document.getElementById("post_content").innerHTML =		
		"<div class='entrybody'><br/><p>Here are a few songs recorded, played and sung by me.</p>"
		+   "<ul><li><a href='/music/I%20will%20follow%20you%20into%20the%20dark.mp3'>"
		+   "I will follow you into the dark (Death Cab Cuties)</a>"
		+   "<embed type='application/x-shockwave-flash' src='http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://piyushhari.com/music/I%20will%20follow%20you%20into%20the%20dark.mp3' width='400' height='27' allowscriptaccess='never' quality='best' bgcolor='#ffffff' wmode='window' flashvars='playerMode=embedded' /></li>"
		+   "<li><a href='/music/time%20of%20your%20life.mp3'>"		
		+   "Time of Your Life (GreenDay)</a>"
		+   "<embed type='application/x-shockwave-flash' src='http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://piyushhari.com/music/time%20of%20your%20life.mp3' width='400' height='27' allowscriptaccess='never' quality='best' bgcolor='#ffffff' wmode='window' flashvars='playerMode=embedded' /></li>"
		+   "<li><a href='/music/IAmYours.mp3'>I am Yours (Jason Marz) Aug 15 2009</a>"
		+   "<embed type='application/x-shockwave-flash' src='http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://piyushhari.com/music/IAmYours.mp3' width='400' height='27' allowscriptaccess='never' quality='best' bgcolor='#ffffff' wmode='window' flashvars='playerMode=embedded' /></li>"
		+   "</ul></div></div>";
	document.getElementById("header_menu").innerHTML = 
		'<ul class="menu" id="menu">'+	 
	         '<li class="page_item page-item-76"><a href="http://piyushhari.com">Home</a></li>'+
	         '<li class="page_item"><a href="?photo" onclick="">Pictures</a></li>'+
		 '<li class="page_item page-item-76"><a href="javascript:showPoemDiv()">Poems</a></li>'+
		 '<li class="current_page_item"><a href="javascript:showMusicDiv()">Music</a></li>'+
		 //'<li class="page_item page-item-76"><a href="?reviews">Reviews</a></li>'+
		 '<li class="page_item page-item-76"><a href="/wordpress/">Blog</a></li>'+
        '</ul>';
}

function showPoemDiv(){	
	init();
	availH = availH-10;
	document.getElementById("post_content").innerHTML =			
		"<div class='entrybody'><br/><p>Here are a few poems written by me:</p>"
		+   "<ul><li><a href='poems/WhenYouCry.html' title='When You Cry' onclick='"
		+   "Modalbox.show(this.href, {title: this.title,height:availH, width:830}); return false;'>"
		+   "When You Cry</a></li>"		
		+   "<li><a href='poems/inspiring.html' title='Inspiring' onclick='"
		+   "Modalbox.show(this.href, {title: this.title,height:availH, width:570}); return false;'>"
		+   "Inspiring</a></li>"
		+   "<li><a href='poems/Remorse.html' title='Remorse' onclick='"
		+   "Modalbox.show(this.href, {title: this.title, height: availH,width:600}); return false;'>"
		+   "Remorse</a></li>"
		+   "<li><a href='poems/yoursmile.html' title='Your Smile...' onclick='"
		+   "Modalbox.show(this.href, {title: this.title, height:availH, width:570}); return false;'>"
		+   "Your Smile</a></li>"
		+   "<li><a href='poems/vain.html' title='Vain...' onclick='"
		+   "Modalbox.show(this.href, {title: this.title, height:availH, width:600}); return false;'>"
		+   "Vain(Jul 17 2009)</a></li>"
		+   "</ul></div></div>";
	document.getElementById("header_menu").innerHTML = 
	'<ul class="menu" id="menu">'+	 
         '<li class="page_item page-item-76"><a href="http://piyushhari.com">Home</a></li>'+
         '<li class="page_item"><a href="?photo" onclick="">Pictures</a></li>'+
	 '<li class="current_page_item"><a href="javascript:showPoemDiv()">Poems</a></li>'+
	 '<li class="page_item page-item-76"><a href="javascript:showMusicDiv()">Music</a></li>'+
	 //'<li class="page_item page-item-76"><a href="?reviews">Reviews</a></li>'+
	 '<li class="page_item page-item-76"><a href="/wordpress/">Blog</a></li>'+
        '</ul>';				
}

function showAlbum(){
	 	var albumsSelect = document.getElementById("albums");
	 	var albumName = albumsSelect[albumsSelect.selectedIndex].text;
	 	window.location="?showPhotos&albumname="+albumName;
}

function showPic(url,title,width,height){		
		init();
		availH = availH-10;
		var imgURL = '<html><div style="text-align:center"><img src="'+url+'"/></div></html>';
		Modalbox.show(imgURL, {title:title,height:availH, width:width});		

}
