function loc_jump(form){
	var URL = document.form.site.options[document.form.site.selectedIndex].value;
	window.location.href = URL;
}


function limit_textarea(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else 
countfield.value = maxlimit - field.value.length;
}



function pop(url, window_name, width, height){
  popup = window.open(url, window_name, 'width=' + width + ',height=' + height + ',scrollbars=yes');
  popup.focus();
  return;
}

function popup(url,windowname,width,height) {
	width=(width)?width:screen.width/3;
	height=(height)?height:screen.height/3;
	var screenX = (screen.width/2 - width/2);
	var screenY = (screen.height/2 - height/2);
	var features= "width=" + width + ",height=" + height;
	features += ",screenX=" + screenX + ",left=" + screenX;
	features += ",screenY=" + screenY  +",top=" + screenY;
	var mywin=window.open(url, windowname, features);
	if (mywin) 
		mywin.focus();
	return mywin;
}

function img_popup(img_id, width, height, img_tag, pic_width, pic_height, title, author, body_bgcolor, body_text, 
    body_link, body_alink, body_vlink, etp_url) {
                
    var w = window.open('', img_id, 'width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes');
    var d = w.document;
    d.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD>' +
        '<BODY BGCOLOR="' + body_bgcolor + '" TEXT="' + body_text + '" LINK="' + body_link + '" ALINK="' +
        body_alink + '" VLINK="' + body_vlink + '"><center>');
            
    if (title != '') {
        d.write('<b><fon3>' + title + '</font></b>');
           
        if (author != '' && author != 0) {
            d.write('<br><fon2>Author: ' + author + '</font>');
        }
        
        d.write('<p>');
    }
         
    d.write('<IMG SRC="' + img_tag + '" WIDTH=' + pic_width + ' HEIGHT=' + pic_height + ' BORDER=0><P><A HREF="' + etp_url +
        '" TARGET="_blank">Email This Image</A>');
        
       
    d.write('<P><fon2><A HREF="javascript: self.close()">Close Window</A></FONT></CENTER></BODY></HTML>');
        
    d.close();
    w.focus();
}





function showBlowup(divID, imageID) {
 if(document.layers) {
  // Navigator 4 model
  var divObject = document.layers[divID]
  var imageObject = document.images[imageID]
  divObject.pageX = imageObject.x
  divObject.pageY = imageObject.y
  divObject.visibility = "visible"
 } else if(document.all) {
  // Internet Explorer model
  var divStyle = document.all.item(divID).style
  var imageObject = document.images[imageID]
  divStyle.posLeft = (window.event.clientX - window.event.offsetX)
  divStyle.posTop = (window.event.clientY - window.event.offsetY + document.body.scrollTop)
  if (navigator.appVersion.indexOf("Mac") >= 0) { // work around Mac IE bug
   divStyle.posTop -= document.body.scrollTop
   }
  divStyle.visibility = "visible"
 }
}

function hideBlowup(divID) {
 if(document.layers) {
   var divObject = document.layers[divID]
   divObject.visibility = "hidden"
 } else if (document.all) {
  // Use IE DHTML
  var divStyle = document.all.item(divID).style
  divStyle.visibility = "hidden"
 }
}

function showBlowupInNewWindow(imageFileURL,width,height) {
 // Workaround for Navigator 6
 windowOptions = "directories=0,menubar=0,personalbar=0,status=0,resizable=1,width="
 windowOptions += width + ",height=" + height
 window.open(imageFileURL,"nav6workaround",windowOptions)
}




function pulldown_hop(select) {
    var i;

    for (i = 0; i < select.options.length; i++) {
        if (select.options[i].selected) {
            if(select.options[i].value!="") {
                window.location.href=select.options[i].value;
                break;
            }
        }
    }
}
