function newRollover(imgName,imgFiles) {
  if (document.images) {
    imgFiles=imgFiles+",";
    imgNo=1;
    while(imgFiles.indexOf(',')!=-1) {
      imgFile=imgFiles.substring(0,imgFiles.indexOf(','));
      imgFiles=imgFiles.substring(imgFiles.indexOf(',')+1,imgFiles.length);
      eval(imgName+"_urc_"+imgNo+"=new Image();");
      eval(imgName+"_urc_"+imgNo+".src='"+imgFile+"'");
      imgNo++;
    }
  }
}

function roll(img,on,type) {
  type=type?type:img;
  if (document.images) 
    eval("document.images['"+img+"'].src="+type+"_urc_"+on+".src");
}

// studio pics roll
function rollStudio(img,on,type) {
  roll(img,on);
  if(document.getElementById(type)){
	var newImg = document.images[img].src;
	var newLink = newImg.substring(0, newImg.length-4)+"_l"+ newImg.substring(newImg.length-4, newImg.length);
	document.getElementById(type).href=newLink;
  }
}

function openNewWindow(url,name,features) { 
  if (features && (navigator.appName=="Netscape" || document.body)) {
    width=height="";
    s=features.indexOf("width")+5; n=0;
    while (n!=2 && (ch=features.charAt(s++)))
      if (ch>="0" && ch<="9") { width+=ch; n=1; } else n<<=1;
    s=features.indexOf("height")+5; n=0;
    while (n!=2 && (ch=features.charAt(s++)))
      if (ch>="0" && ch<="9") { height+=ch; n=1; } else n<<=1;
    leftpos=(navigator.appName=="Netscape"?
	     window.outerWidth/2+window.screenX:document.body.offsetWidth/2+window.screenLeft)-width/2;
    toppos= (navigator.appName=="Netscape"?
	     window.outerHeight/2+window.screenY:screen.height/2.5)-height/2;
    features+=",left="+leftpos+",top="+toppos+",screenX="+leftpos+",screenY="+toppos;
  } 
  newWindow=features?window.open(url,name,features):window.open(url,name);
}

// select param value for select and radio objects
function selOptionVal(obj,val,type)
{
	var i=0
	for (i=0;i<=obj.length;i++)	{
		if(obj[i].value==val) {
			switch(type) {
			case "select":
				obj[i].selected=true;
				break;
			case "radio":
				obj[i].checked=true;
				break;
			}	// end of switch
			break; 	// break for loop
		}	// end of if
	} 	// end of for loop
}

// hide style id specified in param
function closeBox(x){
	document.getElementById(x).style.visibility="hidden";
}
