﻿// JScript Filefunction getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?"));
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if ( 
aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return strReturn;
} 
function insertFlash(strAct, strEpisode){
// this writes out the entire OBJECT tag.  If you use this kind of code
// often, you should consider writing a function to do this.  Then you
// can pass parameters (swf filename, width, height, etc) and reuse the
// function.  Some parameters have been truncated to fit this space.  
// Just pay attention to the red portion.
document.write(
  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
  '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"\n'+   
  '  bgcolor="black" width="95%" height="95%"ALIGN="middle">\n'+
  '  <param name=movie value="Peculiarity.swf?act='+ strAct + '&episode='+ strEpisode + '">\n '+
  '  <param name=quality value=high>\n'+
  '  <param name=bgcolor value=#000000>\n'+
  '  <embed src="Peculiarity.swf?act=' + strAct+ '&episode='+ strEpisode +'" quality=high \n'+
  '     pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"\n' +
  '		type="application/x-shockwave-flash" bgcolor="#000000" width="800" height="600"align="middle">\n'+
  '  </embed>\n'+
  '</object>\n');
}

function insertSingleMovie(strFileName){
// this writes out the entire OBJECT tag.  If you use this kind of code
// often, you should consider writing a function to do this.  Then you
// can pass parameters (swf filename, width, height, etc) and reuse the
// function.  Some parameters have been truncated to fit this space.  
// Just pay attention to the red portion.
document.write(
  '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
  '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"\n'+   
  '  bgcolor="black" width="320" height="240"ALIGN="middle">\n'+
  '  <param name=movie value="PLPlayer.swf?PLMedia='+ strFileName +'">\n '+
  '  <param name=quality value=high>\n'+
  '  <param name=bgcolor value=#000000>\n'+
  '  <embed src=PLPlayer.swf?PLMedia=' + strFileName + ' quality=high \n'+
  '     pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"\n' +
  '		type="application/x-shockwave-flash" bgcolor="#000000" width="320" height="240"align="middle">\n'+
  '  </embed>\n'+
  '</object>\n');
}
function button_on ( buttonName )
{
  if ( document.images )
  {
    document[buttonName].src = ("http://www.peculiarity.co.uk/Graphics/Nav_" + buttonName + "_2.jpg");
  }
}

function button_off ( buttonName )
{
  if ( document.images )
  {
    document[buttonName].src = ("http://www.peculiarity.co.uk/Graphics/Nav_" + buttonName + "_1.jpg");
  }
}

