Hello, world! I need help on something.I don't know much about javascript and I have two different scripts to merge, combine or whatever they call it:

function doSomething() {}

(function loop() {
var rand = Math.round(Math.random() * (30000 - 1000)) + 1000;
setTimeout(function() {
alert('A');
doSomething();
loop();
}, rand);
}());

And this one:

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen…
if(pos=="center"){LeftPosition=(screen…
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20…
settings='width='+w+',height='+h+',top…
win=window.open(mypage,myname,settings…

Can someone help me on this matter?

My thanks to everyone.