
var root = '';
if (document.location.toString().indexOf("localhost") > 0)
  root = '/AFM2008';

var ie5=(document.getElementById && document.all)? true : false;

mouser_mx=0; mouser_my=0;
function mouseMoveHandler(evt)
{

	mouser_mx=(ie5)?event.clientX:evt.pageX;
	mouser_my=(ie5)?event.clientY:evt.pageY;
	return true;

}
document.onmousemove=mouseMoveHandler;


function DrawSWF(id, file, width, height, AddParms, Embed)
{

	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + id + '" align="middle"  VIEWASTEXT>\n<param name="allowScriptAccess" value="always" />\n<param name="movie" value="' + file + '" />' + AddParms + '<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="' + file + '" ' + Embed + ' quality="high" bgcolor="#EEEBEB" width="' + width + '" height="' + height + '" name="' + id + '" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n</object>');

}



function checkEnter(e, eventTarget) //e is event object passed from function invocation
{


    if (e == undefined)
        return false;

    var characterCode //literal character code will be stored in this variable

    if (e && e.which) { //if which property of event object is supported (NN4)
        e = e;
        characterCode = e.which; //character code is contained in NN4's which property
    }
    else {
        try {
            e = event;
            characterCode = e.keyCode; //character code is contained in IE's keyCode property
        }
        catch (e) {
        }
    }
    if (characterCode == 13) { //if generated character code is equal to ascii 13 (if enter key)
        //document.forms[0].submit(); //submit the form
        if (eventTarget.length > 0)
            __doPostBack(eventTarget, '')

        return false;
    }
    else {
        return true;
    }

}
