Ok folks. I'm stuck. I have a random image/link generating code that works great. However, the moment I call another function using onClick that will set the size of a new window once the link is clicked my links and images don't display. I need help.

The current code is called in the body from a separate javascript file using <script type="text/javascript" src="randpagld.js"></script>
it appears as follows:

----------------------------------------------------------------------------------------------------

function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[0]="images/img1.jpg"
myimages[1]="images/img2.jpg"
myimages[2]="images/img3.jpg"

var ry=Math.floor(Math.random()*myimages.length)

if (ry==0){
document.write('<img alt="put a popup message here" src="'+myimages[ry]+'" border=0>')
}
else if (ry==1){
document.write( '<a href="link to new page" onClick="winBRopen('specify link here also','','725',' 500','','','yes');return false;"><img alt="put a popup message here" src="'+myimages[ry]+'" border=0></a>' );
}
else{
document.write( '<a href="link to new page" onClick="winBRopen('specify link here also','','725',' 500','','','yes');return false;"><img alt="put a popup message here" src="'+myimages[ry]+'" border=0></a>' );
}
}

random_imglink()
document.write('<br>')

--------------------------------------------------------------------------------------------------------------

The winBRopen function is called from another .js file that I call in the header of the page the same way that I called the last .js file.
It appears as follows:

-----------------------------------------------------------------------------------------------------------

function winBRopen(theURL, Name, popW, popH, scroll)
{
var winleft = (screen.width - popW) / 2;
var winUp = (screen.height - popH) / 2;
winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+','
Win = window.open(theURL, Name, winProp)
if (parseInt(navigator.appVersion) >= 4)
{
Win.window.focus();
}
}

---------------------------------------------------------------------------------------------------------------------

I've also attempted using the window.open method in onClick and putting both functions in the same .js file to call winBRopen. None seemed to work.