/* ------------------------------------------------------------------------ */
/* ------------------------------ runSwfs --------------------------------- */
/* ------------------------------------------------------------------------ */
function runSwf_headerIndex()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="880" height="340">\n')
    document.write('<param name="movie" value="images/header_index.swf">\n')
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<param name="quality" value="high"/>\n')
    document.write('<param name="menu" value="false">\n')	
    document.write('<embed src="images/header_index.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="880" height="340"></embed>\n')
    document.write('</object>\n')
}
function runSwf_pdtsNavIndex()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="920" height="170">\n')
    document.write('<param name="movie" value="images/pdtsNav_index.swf">\n')
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<param name="quality" value="high"/>\n')
    document.write('<param name="menu" value="false">\n')	
    document.write('<embed src="images/pdtsNav_index.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="920" height="170"></embed>\n')
    document.write('</object>\n')
}
function runSwf_header(location)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="880" height="210">\n')
    document.write('<param name="movie" value="images/header_subPages.swf?target='+location+'">\n')
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
    document.write('<embed src="images/header_subPages.swf?target='+location+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="880" height="210"></embed>\n')
    document.write('</object>\n')
}
function runSwf_pdtsNav(location)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="920" height="80">\n')
    document.write('<param name="movie" value="images/pdtsNav_subPages.swf?target='+location+'">\n')
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
    document.write('<embed src="images/pdtsNav_subPages.swf?target='+location+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="920" height="80"></embed>\n')
    document.write('</object>\n')
}
function runSwf_navSub_pdts_cctv(location)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="260" height="240">\n')
    document.write('<param name="movie" value="images/navSub_pdts_cctv.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
    document.write('<embed src="images/navSub_pdts_cctv.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="240"></embed>\n')
    document.write('</object>\n')
}
function runSwf_navSub_pdts_accessControl()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="260" height="50">\n')
    document.write('<param name="movie" value="images/navSub_pdts_accessControl.swf">\n')
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<param name="quality" value="high"/>\n')
    document.write('<param name="menu" value="false">\n')	
    document.write('<embed src="images/navSub_pdts_accessControl.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="50"></embed>\n')
    document.write('</object>\n')
}
function runSwf_navSub_pdts_intruderAlarm(location)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="260" height="134">\n')
    document.write('<param name="movie" value="images/navSub_pdts_intruderAlarm.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
    document.write('<embed src="images/navSub_pdts_intruderAlarm.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="134"></embed>\n')
    document.write('</object>\n')
}
function runSwf_navSub_pdts_supportEqpt(location)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="260" height="197">\n')
    document.write('<param name="movie" value="images/navSub_pdts_supportEqpt.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
    document.write('<embed src="images/navSub_pdts_supportEqpt.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="197"></embed>\n')
    document.write('</object>\n')
}
/* ------------------------------------------------------------------------ */
/* ---------------------------- DW Functions ------------------------------ */
/* ------------------------------------------------------------------------ */
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];}
}
/* ------------------------------------------------------------------------ */
/* ------------------------- Copyright Message ---------------------------- */
/* ------------------------------------------------------------------------ */
function generate_copyrightMsg(){
	document.write('Copyright &copy; International Security Products Pte Ltd. All Rights Reserved.')
}
/* ------------------------------------------------------------------------ */
/* ---------------------------- Floating Anchor --------------------------- */
/* ------------------------------------------------------------------------ */
var target_x = 0;
var target_y = 200;

var has_inner = typeof(window.innerWidth) == 'number';
var has_element = document.documentElement && document.documentElement.clientWidth;

var fm_id='floatingAnchor';

var fm_shift_x, fm_shift_y, fm_next_x, fm_next_y;

function move_menu()
{
    if (document.layers)
    {
        //floating_menu.left = fm_next_x;
        floating_menu.top = fm_next_y;
    }
    else
    {
        //floating_menu.style.left = fm_next_x + 'px';
        floating_menu.style.top = fm_next_y + 'px';
    }
}

function compute_shifts()
{
    fm_shift_x = has_inner
        ? pageXOffset
        : has_element
          ? document.documentElement.scrollLeft
          : document.body.scrollLeft;
    if (target_x < 0)
        fm_shift_x += has_inner
            ? window.innerWidth
            : has_element
              ? document.documentElement.clientWidth
              : document.body.clientWidth;

    fm_shift_y = has_inner
        ? pageYOffset
        : has_element
          ? document.documentElement.scrollTop
          : document.body.scrollTop;
    if (target_y < 0)
        fm_shift_y += has_inner
            ? window.innerHeight
            : has_element
              ? document.documentElement.clientHeight
              : document.body.clientHeight;
}

function float_menu()
{
    var step_x, step_y;

    compute_shifts();

    step_x = (fm_shift_x + target_x - fm_next_x) * .07;
    if (Math.abs(step_x) < .5)
        step_x = fm_shift_x + target_x - fm_next_x;

    step_y = (fm_shift_y + target_y - fm_next_y) * .07;
    if (Math.abs(step_y) < .5)
        step_y = fm_shift_y + target_y - fm_next_y;

    if (Math.abs(step_x) > 0 ||
        Math.abs(step_y) > 0)
    {
        fm_next_x += step_x;
        fm_next_y += step_y;
        move_menu();
    }

    setTimeout('float_menu()', 20);
};

function float_it()
{
compute_shifts();
if (document.layers)
{
    // Netscape 4 cannot perform init move
    // when the page loads.
    fm_next_x = 0;
    fm_next_y = 0;
}
else
{
    fm_next_x = fm_shift_x + target_x;
    fm_next_y = fm_shift_y + target_y;
    move_menu();
}
float_menu();

}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
