
/* ------------------------------------------------------------------------ */
/* -------------------- Copyright & Footer Message ------------------------ */
/* ------------------------------------------------------------------------ */
function generate_footerMsg(){
	document.write('<p class="footerText-coyName">Deltafield Engineering Pte Ltd</p>')
	document.write('<p class="footerText-address"><span class="lightBlue">Address</span><br />53 Gul Drive, <br />Singapore 629497</p>')
	document.write('<p class="footerText-contact"><span class="lightBlue">Contact </span><br />Telephone: +65 6862 3331 <br />Facsimile:  &nbsp;+65 6862 4448 <br />')
	document.write('Email: <a href="mailto:sales@deltafieldengrg.com">sales@deltafieldengrg.com</a></p>')
}
function generate_copyRightMsg(){
	document.write('Copyright &copy; Deltafield Engineering Pte Ltd. All Rights Reserved.')
}
/* ------------------------------------------------------------------------ */
/* ------------------------------ runSwfs --------------------------------- */
/* ------------------------------------------------------------------------ */

function runSwf_intro()
{
	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="615" height="375">\n')
    document.write('<param name="movie" value="images/intro.swf">\n')
    document.write('<param name="quality" value="high"/>\n')
    document.write('<param name="menu" value="false">\n')	
    document.write('<embed src="images/intro.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="615" height="375"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navMain(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="245" height="79">\n')
    document.write('<param name="movie" value="images/navMain.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
	document.write('<param name="wmode" value="transparent">\n') 
    document.write('<embed src="images/navMain.swf?target='+location+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="245" height="79"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navServices(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="615" height="85">\n')
    document.write('<param name="movie" value="images/navServices.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')
	document.write('<param name="wmode" value="transparent">\n') 
    document.write('<embed src="images/navServices.swf?target='+location+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="615" height="85"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navTop(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="615" height="25">\n')
    document.write('<param name="movie" value="images/navTop.swf?target='+location+'">\n')
    document.write('<param name="quality" value="high"/>\n')
	document.write('<param name="menu" value="false">\n')	
	document.write('<param name="wmode" value="transparent">\n')
    document.write('<embed src="images/navTop.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="615" height="25"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navSub_turnkey(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="205" height="335">\n')
    document.write('<param name="movie" value="images/navSub_turnkey.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_turnkey.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="205" height="335"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navSub_projectSupply(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="205" height="280">\n')
    document.write('<param name="movie" value="images/navSub_projectSupply.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_projectSupply.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="205" height="280"></embed>\n')
    document.write('</object>\n')
}

function runSwf_navSub_trading(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="205" height="280">\n')
    document.write('<param name="movie" value="images/navSub_trading.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_trading.swf?target='+location+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="205" height="280"></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];}
}
/* ------------------------------------------------------------------------ */
/* ---------------------------- Floating Anchor --------------------------- */
/* ------------------------------------------------------------------------ */
var target_x = 0;
var target_y = 0;

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();

}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
