Hello everyone.
I would like to ask some help into how I would do this.
I have a one page html report(perhaps this is irrelevant but it uses GoogleCharts with lots of looping) with a function called on the <body onLoad

My goal is to set a timer so that whenever there is inactivity for a certain amount of time,
the page will expire.(For now, I'm just using some alert to confirm it's working after the set time.)

I have tried it on a different html file I created, and it would work.
However, when I integrate it with the original file that I am trying to modify, there are certain scenarios happening.

a) I put the <script> inside the <head> to call the function(wherein I have the function declared inside and before the end of the <body> tag). The result : Content did not show.

b) I removed the script inside the <head> tag. Result: The content did not show, but the timer alert executed after the set time.

c) I also tried doing <body onLoad="func1(); func2();">
but it wouldn't work either.

Bottomline is, it seems that I cannot load two functions at the same time(especially inside the body onLoad), either one or another will only work  fine , but never both of them.
Moreover I tried this one I found on the net , but still isn't working, or there might be something wrong the way I did  this.


   function addLoadEvent(func){
     var oldonload = window.onload;
     if(typeof window.onload !='function'){
     window.onload = idleLogout();
     window.onload = printTime(){

I'm pretty much stuck with this already and is hoping anyone would help me just by using javascript.
Thank you very much.