<!--
function popUpImage(theURL) { 	
  	w=window.open(theURL,'IMAGE_POPUP','menubar=yes,scrollbars=yes,resizable=yes,width=780,height=655');
	w.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function nextPage ( geturi ) {
    var pageimgs;
    if (document.searchForm.imageselect) {
	    pageimgs = document.searchForm.imageselect.length;
    }
  if(pageimgs){
    for(var i=0; i<pageimgs; i++){
      if( document.searchForm.imageselect[i].checked ){
	geturi += '&is=' + document.searchForm.imageselect[i].value;
      }
    }
  }
 document.location.href = geturi;
}

function nextagentpage (geturi) {
	var listadd = document.searchForm.list_add.length;
  	var pageimgs = document.searchForm.imageselect.length;
	var agentcountries = document.searchForm.agent_country.length;
//	var nextmonth = document.searchForm.next_month.length;

// geturi = unescape(geturi);

  if( listadd ){
    for(var i=0; i<listadd; i++){	
      if( document.searchForm.list_add[i].checked ){
	geturi += '&la=' + document.searchForm.list_add[i].value;
      }
    }
  }
  else {
    if( document.searchForm.list_add.checked ){
      geturi += '&la=' + document.searchForm.list_add.value;
    }
  }

  if( pageimgs ){
    for(var i=0; i<pageimgs; i++){	
      if( document.searchForm.imageselect[i] ){
	geturi += '&is=' + document.searchForm.imageselect[i].value;
      }
    }
  }
  else {
    if( document.searchForm.imageselect ){
      geturi += '&is=' + document.searchForm.imageselect.value;
    }
  }

 // if( nextmonth ){
//      if( document.searchForm.next_month.checked ){
//	geturi += '&next_month=' + document.searchForm.imageselect.value;
//      }
//  }
//  else {
//    if( document.searchForm.next_month.checked ){
//      geturi += '&next_month=' + document.searchForm.imageselect.value;
//    }
//  }

  if( agentcountries ){
    	for(var i=0; i<agentcountries; i++){	
      		if( document.searchForm.agent_country[i].value ){
			var country_field_name = eval("document.searchForm.agent_country[i].value");
			country_field_name = "country_" + country_field_name;
//			alert('here:' + country_field_name);
			var country_field_object = eval("document.searchForm."+country_field_name);
//			alert('here:' +country_field_object);
			var country = country_field_object.name;
			var restrict = country_field_object.value;
//			alert('country: ' + country + ', restrict: ' + restrict);
			if ( country ) {
	   			geturi += '&include' + country + '='  + country + "." + restrict;
			}
      		}
    	}
 } else {
    	if( document.searchForm.agent_country.value ){
		var restrict = document.searchForm.agent_country.value;
		if ( restrict ) {
	    		geturi += '&include=' + restrict;
		}
   	}
    
  }

  document.location.href = geturi;
}


function clickgo(choice){
  var x;
  x=choice.options[choice.selectedIndex].value;
  window.open(x,"_top");
}

function externalSite(uri){               
   var windowWidth = 700;
   var windowHeight = 500;
   var Xoffset = 50;
   var Yoffset = 50;
   var NewWindowFeatures = "left="+Xoffset+",screenX="+Xoffset+",top="+Yoffset+",screenY="+Yoffset+",width="+windowWidth+",height="+windowHeight+",location=yes,menubar=yes,status=no,toolbar=no,scrollbars=yes,resizable=yes";

  childWindow = window.open(uri, '_new', NewWindowFeatures, false);
}

function add_search_country ( geturi ) {
    var country_param = document.country_form.country.value;
    if (country_param) {
        if (country_param != -1 || country_param != 0) {
            geturi += '&country=' + country_param;
//    alert('here:' + country_param + geturi );
        }
    } else {
        geturi += '&country=' + country_param;
    }

    document.location.href = geturi;
}
//-->

