/*
Written by Samsudin Kamis, samsudin@yahoo-inc.com
Copyright 2002 (c) Yahoo! Singapore Pte Ltd. All Rights Reserved.
Last Updated 18th November 2002 version 3.0
*/

// Preload the images
image0 = new Image();
image0.src = mntl_altimg;

var ua,an,ie,mac,win,ns,ns6,ge;
ua=navigator.userAgent;
an=navigator.appName;
ie=ua.indexOf('MSIE')>=0;
mac=ua.indexOf('Mac')>=0;
win=ua.indexOf('Windows')>=0;
unx=ua.indexOf('Unix')>=0;
ns=an.indexOf('Netscape')>=0;
ns6=ua.indexOf('Netscape6')>=0;
ge=ua.indexOf('Gecko')>=0;

function MNTLopenWindow(x){
if (target=="_top"){
    top.location=mntl_URL[x];
    } else {
    window.open(mntl_URL[x]);
    }
}

function start_mntl(){
   document.all.banner_click_mntl.play();
}

// You call function which is located in http://sg.java.yahoo.com/java/flash/ytrack_dhtml.js
overtime=checkOverTime(name, lifetime, duration);

var op;
if ((navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1))
{
  op = true;
}

function close_ad(){
   document.all.banner_click_mntl.rewind();
   document.all.banner_click_mntl.stop();
   document.all.mktp_div.style.visibility = "visible";
   document.all.banner_click_mntl.style.visibility = "hidden";
}


function play_flash(){
   replayGif();
   document.all.mktp_div.style.visibility = "hidden";
   document.all.banner_click_mntl.style.visibility = "visible";
   document.all.banner_click_mntl.style.display = "inline";
   document.all.banner_click_mntl.play();
}

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (!overtime&&plugin ) {
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 3;
}
else if (!overtime && navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && navigator.userAgent.indexOf("Windows")>=0) {
	document.write('<div name="item0" id=item0 style="position:relative;visibility:;height:160;width:440;z-index:110">');
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('</SCRIPT\> \n');
}
if ( !overtime&&ie&&win&&plugin&&!op ) {
        document.write('<div id=mktp_div style="position:absolute;visibility:hidden;height:160;width:440;display:inline;z-index:102;left:0;top:0">');
        document.write('<a href="'+mntl_altURL+'"><img src="'+mntl_altimg+'" width=440 border=0></a><br>');
        document.write('<center><font face=arial size=-2><a href="#" onClick="play_flash();return false;">Replay Animation</a>&nbsp;-&nbsp;<a href="http://add.yahoo.com/fast/help/sg/ads/cgi_comment">Ad Feedback</a></font></center>');
        document.write('</div>');

	document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id=banner_click_mntl STYLE="POSITION: absolute; VISIBILITY:VISIBLE;width='+mntl_width+';height='+mntl_height+';top:-160;left:0;z-index:300"><param name=movie value="'+mntl_flashfile+'"><param name=quality value=high><param name=wmode value=transparent><param name=loop value=false>');
	document.write('</object></div>')
        replayAuto();

} else if (ie&&win&&!op){
        document.write('<div name="item1" id=item1 style="position:absolute;visibility:;height:160;width:440;display: inline; z-index: 102"><script language=vbscript\>\non error resume next\nSub banner_click_FSCommand(ByVal command, ByVal args)\ncall banner_click_DoFSCommand(command, args)\nend sub</script\>\n');
 document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ID=banner_click_mntl WIDTH='+mntl_width+' HEIGHT='+mntl_height+' style="position:absolute;visibility: hidden; display:none;width='+mntl_width+';height='+mntl_height+';left:0;z-index:200;top:-160;right:0"><PARAM NAME=movie VALUE="' + mntl_flashfile + '"><PARAM NAME=quality VALUE=autohigh><PARAM NAME=loop VALUE=false><param name=wmode value=transparent><param name=play value=true></OBJECT></div>');
        document.write('</object></div>')
        document.write('<div id=mktp_div style="width:440; height:160; visibility: visible; top: 0; left: 0">');
        document.write('<a href="'+mntl_altURL+'"><img src="'+mntl_altimg+'" width=440 border=0></a>');
        document.write('<br><center><font face=arial size=-2><a href="#" onClick="play_flash();return false;">Replay Animation</a>&nbsp;-&nbsp;<a href="http://add.yahoo.com/fast/help/sg/ads/cgi_comment">Ad Feedback</a></font></center>');
        document.write('</div>');
} else {
	document.write('<A HREF="'+ mntl_altURL +'"><IMG SRC="'+mntl_altimg+'" WIDTH=440 HEIGHT=160 BORDER=0></A>');
}
