
var keyEnterFocus="";var enterKeyAction="";addKeyUpEvent(keyActions);function keyActions(e)
{if(!e)e=window.event;if(e.keyCode==13)
{if(keyEnterFocus!="")
{document.getElementById(keyEnterFocus).focus();}
if(enterKeyAction!="")
{eval(enterKeyAction);}}}
function addLoadEvent(func)
{if(thisBrowser=="Safari")
{if(window.addEventListener)
{window.addEventListener('load',func,false);}
else if(window.attachEvent)
{window.attachEvent('onload',func);}}
else
{var oldonload=window.onload;if(typeof window.onload!='function')
{window.onload=func;}
else
{window.onload=function(e)
{if(oldonload)
{oldonload(e);}
func(e);}}}}
function addMouseMoveEvent(func)
{var oldEvent=document.onmousemove;if(typeof document.onmousemove!='function')
{document.onmousemove=func;}
else
{document.onmousemove=function()
{if(oldEvent)
{oldEvent();}
func();}}}
function addMouseDownEvent(func)
{var oldEvent=document.onmousedown;if(typeof document.onmousedown!='function')
{document.onmousedown=func;}
else
{document.onmousedown=function()
{if(oldEvent)
{oldEvent();}
func();}}}
function addMouseUpEvent(func)
{var oldEvent=document.onmouseup;if(typeof document.onmouseup!='function')
{document.onmouseup=func;}
else
{document.onmouseup=function()
{if(oldEvent)
{oldEvent();}
func();}}}
function addKeyUpEvent(func)
{var oldEvent=document.onkeyup;if(typeof document.onkeyup!='function')
{document.onkeyup=func;}
else
{document.onkeyup=function(e)
{if(oldEvent)
{oldEvent(e);}
func(e);}}}
function addResizeEvent(func)
{var oldEvent=window.onresize;if(typeof window.onresize!='function')
{window.onresize=func;}
else
{window.onresize=function()
{if(oldEvent)
{oldEvent();}
func();}}}
function addScrollEvent(func)
{var oldEvent=window.onscroll;if(typeof window.onscroll!='function')
{window.onscroll=func;}
else
{window.onscroll=function()
{if(oldEvent)
{oldEvent();}
func();}}}
