/* Start of play_wm
This function will play wm and WMA files.

Include play_scripts, e.g.:
<script src="scripts/play_scripts.js" language="JavaScript" type="text/javascript"></script>

Calling the function:
<script language="JavaScript"type="text/javascript" >play_wm(320,310,"sami_promo_dr_balasingh.wm");</script>
<script language="JavaScript"type="text/javascript" >play_qta("audio.mp3");</script>
*/

function play_qta(qta_path)
{

var html, qta_path

  html = "<"+"OBJECT ID='MediaPlayer' CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='300' HEIGHT='18' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab' type='application/x-oleobject'>\n"
  html += "<"+"PARAM name='SRC' VALUE=" + qta_path + ">\n"
  html += "<"+"PARAM name='AUTOPLAY' VALUE='FALSE'>\n"
  html += "<"+"PARAM name='CONTROLLER' VALUE='TRUE'>\n"
  html += "<"+"EMBED SRC=" + qta_path + " WIDTH='200' HEIGHT='16' AUTOPLAY='FALSE' CONTROLLER='1' PLUGINSPAGE='http://www.apple.com/quicktime/download/'>\n"
  html += "<"+"/EMBED>\n"
  html += "<"+"/OBJECT>\n"

  document.write(html)

}

function play_wm(wm_width, wm_height, wm_path)
{

var html, wm_width, wm_height, wm_path

  html = "<"+"OBJECT ID='MediaPlayer' CLASSID='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' WIDTH='" + wm_width +"' HEIGHT='" + wm_height + "' CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112' type='application/x-oleobject'>\n"
  html += "<"+"PARAM name='SRC' VALUE=" + wm_path + ">\n"
  html += "<"+"PARAM name='AUTOPLAY' VALUE='FALSE'>\n"
  html += "<"+"PARAM name='CONTROLLER' VALUE='TRUE'>\n"
  html += "<"+"PARAM name='ShowStatusBar' VALUE='TRUE'>\n"
  html += "<"+"EMBED type='application/x-mplayer2' SRC=" + wm_path + " WIDTH='" + wm_width + "' HEIGHT='" + wm_height +"' AUTOPLAY='FALSE' CONTROLLER='1' ShowStatusBar='1' type='application/x-mplayer2' PLUGINSPAGE='http://www.microsoft.com/Windows/MediaPlayer/'>\n"
  html += "<"+"/EMBED>\n"
  html += "<"+"/OBJECT>\n"

  document.write(html)

}

/* End of play_wm */

/* =============================================
================================================ */

/* Start of menu function */ 

function over_effect(e,state)
{
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menulines")
source4.style.borderStyle=state
else{
while(source4.tagName!="TABLE"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menulines")
source4.style.borderStyle=state
}
}
}

/* End of menu function */ 

/* Start of image rollover function */ 

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/* End of image rollover function */ 

/* =============================================
================================================ */

/* Start of load_map
This function will load a mpa from: http://www.frappr.com

Calling the function:
<script language="JavaScript"type="text/javascript" >load_map();</script>
*/

function load_map()
{
  html = "<"+"EMBED quality='high' type='application/x-shockwave-flash' src='http://www.frappr.com/ajax/yvmap.swf' flashvars='host=http://www.frappr.com/&origin=other&lo=1&mvid=68720251067' salign='l' align='middle' scale='noscale' width='500' height='300'>\n"
  html += "<"+"/EMBED>\n"
  document.write(html)

}

/* End of load_map */


/* Start of load_map*/

function play_fmp3(swf_loc, mp3_loc)
{

var html, swf_loc, mp3_loc

  html = "<"+"object type='application/x-shockwave-flash' data='" + swf_loc +"' width = '400' height='40'>\n"
  html += "<"+"param name='movie' value='" + swf_loc +"'>\n"
  html += "<"+"param name='bgcolor' value='#ffffff'>\n"
  html += "<"+"param name='FlashVars' value='mp3=" + mp3_loc +"&showstop=1&showinfo=1&showvolume=1&bgcolor1=000066&bgcolor2=3399FF&buttoncolor=e6e6e6&sliderwidth=10'>\n"
  html += "<"+"/object>\n"

  document.write(html)

}

/* End of play_wm */


/* End of load_map */