/* 	Copyright:	ARTwareSoftware 
	Project:	Monthly pages
	File: 		trip_js.js 
	Version: 	0.0 
	Description:	Javascript support file
*/

  function popWindow(pic,w,size) {
	resize = size + ',resizable'
	popWnd = window.open('',w,resize)
	popWnd.document.write("<HTML><HEAD><TITLE>2002/4 Europe Trip </TITLE></HEAD>")
	popWnd.document.write("<BODY topmargin=0 marginheight=0 bgcolor=silver>")
	popWnd.document.write("<table border=0 cellpadding=0 height=100% width=100%>")
	popWnd.document.write("<tr valign=center><td align=center>")
	popWnd.document.write("<img src='" + pic + "' align=center valign=center>")
	popWnd.document.write("</td></tr></table></BODY></HTML>")
	popWnd.document.close()
	popWnd.focus()
    }
    D  = new Array(
	"d3565","d3573","d3598","d3719","d3584","d3558","d3589","d3601","d3571",
	"d3552","d3555","d3593","d3553","brown","gray")
    CZ = new Array(
	"cs3604","cs3608","cs3676","cs3692","cs3696","cs3704","cs3689","cs3701",
	"cs3708","cs3706","cs3630","cs3661","cs3669","cs3625","cs3659","cs3615","blue","yellow")
    F  = new Array(
	"f3729","f3749","f3759","f3760","f3767","f3771","f3772","f3770",
	"f3764","f3768","f3733","f3765","f3755","f3747","f3781","f3748","green")
    CH = new Array(
	"ch3815","ch3819","ch3821","ch3853","ch3854","ch3862","ch3817","ch3797",
	"ch3856","ch3784","ch3831","ch3814","ch3804","ch3822","red","gray")

    function selImg(cntry) {
      var nm =  cntry.length
      var sel = Math.floor( Math.random()* nm )
      return( cntry[sel] )
    }
    function cntryImg(cntry,num) {
	var dir ='images/tripimg/'
	var old = -1
	for(l=0; l < num; l++) {
      	    sel = selImg(cntry)
	    if( sel == old) { sel = selImg(cntry) }
	    old = sel
      	    img  = dir + sel + '.jpg'
      	    imgs = dir + sel + 's.jpg'
      	    document.write("<a HREF=\"JAVASCRIPT:popWindow('" + img  )
      	    document.write("','w','width=830,height=630')\" >\n")	
      	    document.write("<img src='" +  imgs + "' border=1></a>")
      	    document.write("\n")
	}
    }

