function resetBodyContent()
{  // reset the body content to its default value
  $('#bodyContent').css( { "height":"650px", "overflow-y":"hidden","overflow-x":"hidden" } ) ; // reset its default height
  $('#bodyContent').html("<img src='images/09103018569553.gif' style='position: relative; top:10%;left: 50%'> ");

  }

function loadContent(sourceFile, docType)
{
  /**
    docType
        0: static html file
	    1:  pdf file
		2:  picture file
  **/
  
  // fadeTo(duration, opacity, callback) , opacity between 0 and 1
  $('#bodyContent').fadeTo(300, 0);  
  
  resetBodyContent();
  
  switch(docType)
  { case 0:
        setTimeout("startLoadFile('" + sourceFile + "')", 500); 
		break;
	case 1:
	    loadPDF(sourceFile);
		 break;
	case 2:
	    loadIMG(sourceFile);
         break;	
  }
  
    document.title = "Islamic Primary School" ;
}
function startLoadFile(sourceFile)
{
  $('#bodyContent').load(sourceFile).fadeTo(500,1);
}

function loadPDF(sourceFile)
{  
  var $content = " <embed src=' " + sourceFile + "' type='application/pdf' width='98%' height='98%'>" ;
  
  $('#bodyContent').html( $content ).fadeTo(500, 1); 
}

function loadIMG(sourceFile)
{  
  $('#bodyContent').html() ;
  var $content = " <img src=' " + sourceFile + "' 'width='650px' height='980x'>" ;
  
  $('#bodyContent').css("height","1000px").html( $content ).fadeTo(500, 1); 
}


function playSound(obj, title)
{  
/**
  AudioPlayer.embed("player1", 
  {  soundFile: obj , titles: title 
  }  );     
  **/
 if ( document.all )
  document.getElementById("mediaPlayer1").fileName = obj
 else
	document.mediaPlayer.src = obj
// alert(  document.getElementbyId("mediaPlayer").src )
}
