function menuClicked(whichBtn){

	switch (whichBtn) {

		case 'EMAIL THIS': emailThis();
    	break;

		case 'VIEW CHANNEL': viewChannel();
		break
	
		case 'CHAT': chat();
		break
	
		case 'BLOG': blog();
		break
	
		case 'POST BULLETIN': postBulletin();
		break
	
		case 'COMMENT': comment();
		break
	
		default:
  		break;
	}
}

function writeVideo(p,sDesc){
	
	writeVideo.p = p;
	writeVideo.sDesc = sDesc;

	document.getElementById('video').innerHTML = '<embed width=\"848\" height=\"520\" type=\"application/x-shockwave-flash\" src=\"http://lads.myspace.com/videos/c.swf?m='+p+' 		&amp;v=2&amp;sr=0&amp;a=1&amp;ap=1&amp;type=video&amp;page=11013005&amp;t=1&amp;mt=video&amp;tvvid='+p+'\"/>'; 

    document.getElementById('caption').innerHTML = '<center><br><font color="#FFFFFF">' + sDesc + '</font></center>';
}

function emailThis(){
	
	if(navigator.appName.indexOf("Microsoft") == -1){
      window.location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.email&videoid="+writeVideo.p;
    }else{
      window.navigate("http://vids.myspace.com/index.cfm?fuseaction=vids.email&videoid="+writeVideo.p);
    }
}

function viewChannel(){
	
	if(navigator.appName.indexOf("Microsoft") == -1){
      window.location.href="http://vids.myspace.com/index.cfm?fuseaction=vids.showvids&friendID=379271013&n=379271013&MyToken=50069973-0db1-485e-8b60-40c00fc3c23d";
    }else{
      window.navigate("http://vids.myspace.com/index.cfm?fuseaction=vids.showvids&friendID=379271013&n=379271013&MyToken=50069973-0db1-485e-8b60-40c00fc3c23d");
    }
}

function chat(){
	IsMySpaceIMInstalledById(379271013);	
}

function blog(){
	
	document.postBlog.subject.value = writeVideo.sDesc;
	document.postBlog.body.value = '<a href=\"http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid='+writeVideo.p+'\">'+writeVideo.sDesc+'</a><br><br><object width=\"425px\" height=\"360px\" ><param name=\"allowFullScreen\" value=\"true\"/><param name=\"movie\" value=\"http://mediaservices.myspace.com/services/media/embed.aspx/m='+writeVideo.p+',t=1,mt=video,searchID=,primarycolor=,secondarycolor=\"/><embed src=\"http://mediaservices.myspace.com/services/media/embed.aspx/m='+writeVideo.p+',t=1,mt=video,searchID=,primarycolor=,secondarycolor=\" width=\"425\" height=\"360\" allowFullScreen=\"true\" type=\"application/x-shockwave-flash\" /></object>';
	document.postBlog.submit();
	
}

function postBulletin(){
	
	document.postBulletin.subject.value = writeVideo.sDesc;
	document.postBulletin.body.value = '<a href=\"http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid='+writeVideo.p+'\">'+writeVideo.sDesc+'</a><br><br><object width=\"425px\" height=\"360px\" ><param name=\"allowFullScreen\" value=\"true\"/><param name=\"movie\" value=\"http://mediaservices.myspace.com/services/media/embed.aspx/m='+writeVideo.p+',t=1,mt=video,searchID=,primarycolor=,secondarycolor=\"/><embed src=\"http://mediaservices.myspace.com/services/media/embed.aspx/m='+writeVideo.p+',t=1,mt=video,searchID=,primarycolor=,secondarycolor=\" width=\"425\" height=\"360\" allowFullScreen=\"true\" type=\"application/x-shockwave-flash\" /></object>';
	document.postBulletin.submit();
}

function comment(){
	
	if(navigator.appName.indexOf("Microsoft") == -1){
      window.location.href="http://comment.myspace.com/index.cfm?fuseaction=user.viewProfile_commentForm&friendID=379271013&MyToken=a54a6ea3-5a80-490d-be87-16a8a4bfdaa3";
    }else{
      window.navigate("http://comment.myspace.com/index.cfm?fuseaction=user.viewProfile_commentForm&friendID=379271013&MyToken=a54a6ea3-5a80-490d-be87-16a8a4bfdaa3");
    }
}




