﻿function Q4U_Player(mp3_files)  {
document.write("<div  id=\"music\" style=\"text-align: center;\">");
document.write("<\/div>");
document.write("    <table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" ");
document.write("        ");
document.write("        style=\"background-image: url('images_6\/Q4u_Player_bg.png'); background-repeat: no-repeat; background-position: center center; height: 63px; width: 283px;\">");
document.write("        <tr>");
document.write("            <td align=\"center\" id=\"signal_td\" valign=\"middle\" width=\"40\"  colspan=\"3\" ");
document.write("                ");
document.write("                style=\"text-align: left; background-image: url('Images\/Clear.gif'); background-repeat: no-repeat;width: 84px; height: 21px\" \/><\/td>");
document.write("        <\/tr>");
document.write("        <tr>");
document.write("            <td align=\"center\" valign=\"top\" width=\"33\" ");
document.write("                style=\"font-size: 1pt; background-image: url('images_6\/Q4u_Stop.png'); background-repeat: no-repeat;\">");
document.write("                ");
document.write("                <a href=\"images_6\/Sadak.wav\" onclick=\"changeStyle('signal_td','Images\/Clear.gif');changeStyle('Play_td','images_6\/Qu4_Play.png');PlayIt_zero(this.href);return false\">");
document.write("                 <img alt=\"\" src=\"Images\/Clear.gif\" height=\"33\" width=\"33\" border=\"0\" \/><\/a><\/td>");
document.write("            <td align=\"center\" id=\"Play_td\" valign=\"middle\" ");
document.write("                style=\"font-size: 12pt; background-image: url('images_6\/Qu4_Play.png'); background-repeat: no-repeat; color: #666666;\" ");
document.write("                width=\"33\">");
document.write("              ");
document.write("                 <a href='"+ mp3_files + "'  onclick=\"changeStyle('signal_td','images_6\/sound-radio-stereo-animated.gif'); changeStyle('Play_td','images_6\/Q4u_Play_over.png');PlayIt_zero(this.href);;return false;\">");
document.write("                     <img src=\"Images\/Clear.gif\" height=\"33\" width=\"33\" border=\"0\" \/><\/a><\/td>");
document.write("            <td align=\"left\" valign=\"top\" style=\"font-size: 1pt\">");
document.write("              ");
document.write("                &nbsp;<\/td>");
document.write("        <\/tr>");
document.write("    <\/table>");
}


//--- Swap images for menu -------------------------------------------

//-------Usage --------

//<a href="http://www.quran4u.net/" onmouseover="changeStyle('div_id','Images/Skin/Gray/button-Ver-Over.jpg')" onmouseout="changeStyleBack('div_id','Images/Skin/Gray/button-Ver.jpg')"><div id="div_id" style="width:148px;height:31px;background-repeat:no-repeat; background-image: url('Images/Skin/Gray/button-Ver.jpg')" align="center" >Gamal</div></a>//

//---------------------
function changeStyle(div_id, img_ovr) {
    document.getElementById(div_id).style.backgroundImage = "url(" + img_ovr + ")";
}

function changeStyleBack(div_id, img_org) {
    document.getElementById(div_id).style.backgroundImage = "url(" + img_org + ")";
}


//---------------------------------------------------------------------------------------
//---- -------        Put This Div  in any Place

//-----<div  id="music" style="text-align: center;"></div>
 

//--------------------- Play with width and height  ----------------------
function PlayIt(what){
document.getElementById('music').innerHTML='<object width="340" height="60" '
+'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
+'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
+'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
+'<param name="url" value="'+what+'">'
+'<param name="uiMode" value="full">'
+'<param name="autoStart" value="true">'
+'<param name="playCount" value="1">'
+'<embed type="application/x-mplayer2" '
+'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
+'showcontrols="1" uimode="full" width="340" height="60" '
+'src="'+what+'" autostart="1" playcount="1">'
+'<\/object>';
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//--------------------- Play with zero width and zero  height  ----------------------

function PlayIt_zero(what) {
	document.getElementById('music').innerHTML = '<object width="0" height=0" '
+ 'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
+ 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
+ 'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
+ '<param name="url" value="' + what + '">'
+ '<param name="uiMode" value="full">'
+ '<param name="autoStart" value="true">'
+ '<param name="playCount" value="1">'
+ '<embed type="application/x-mplayer2" '
+ 'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
+ 'showcontrols="1" uimode="full" width="0" height="0" '
+ 'src="' + what + '" autostart="1" playcount="1">'
+ '<\/object>';
}

//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//--------------------- Play with width and height for IE only  ----------------------

function play(media) {
	document.getElementById('mediaplayer').innerHTML = '<OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701"' + 'STANDBY="Loading Microsoft Windows® Media Player components..."' + 'TYPE="application/x-oleobject" width="0" height="0"><PARAM NAME="fileName" VALUE="' + media + '"><PARAM NAME="autoStart" VALUE="true">' + '<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" SRC="' + media + '" name="MediaPlayer1" width=0 height=0 autostart=1></OBJECT>'
}

//----------------------------------- Image Border ----------------------------------
function Img_border_On(iid) {
    document.getElementById(iid).border = '2';
}

function Img_border_Off(iiid) {
    document.getElementById(iiid).border = '0';
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function openIFrame(Sura,Aya) {
        document.getElementById('if1').src = 'Quran-Surah-Tafseer.aspx?surah=' + Sura + '&Ayah=' + Aya;
   }

