function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px;vertical-align:middle; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
			img.align="absmiddle";
            i = i-1
         }
      }
   }    
}
function removeAllTheSel(theSel)
{
   for(i=theSel.length-1; i>=0; i--) theSel.options[i] = null;
}
function appendTheSel(theSel, newText, newValue)
{
 if (theSel.length == 0) {
    var newOpt1 = new Option(newText, newValue);
    theSel.options[0] = newOpt1;
    theSel.selectedIndex = 0;
  } else{
	  if(newValue!="" && newText!=""){
	    var newOpt1 = new Option(newText, newValue);
	    theSel.options[theSel.length] = newOpt1;
	    theSel.selectedIndex = 0;  
	  }
  }
}
function goto(url){
	if(url!="#"){
		document.form1.action=url;
		document.form1.submit();
	}
}
function is_email(str){
	 var str_arr = str.split("@");
	  var return_value=true;
	  if(str_arr.length!=2){
	  		return_value= false;
	  }  
	  str_arr = str.split(".");
	   if(str_arr.length!=2 && str_arr.length!=3){
	  		return_value= false;
	  }  
	  return return_value;
}
function mail_to(email){
	window.open("mail_to.php?email="+email,'',"scrollbars=1  resizable=1 width=400 height=300");
}
function setOpacity(obj) {
	obj.style.filter = "alpha(opacity=" + (40) + ")";
}
function setOpacityOff(obj){
	obj.style.filter = "alpha(opacity=" + (100) + ")";
}
function tour_show_detail(tour_id){
		window.open("tour_detail.php?tour_id="+tour_id,'',"scrollbars=1  resizable=1 width=750 height=500");
}
function goto_page(url,page){
	document.form1.action=url+"?s_page="+page;
	document.form1.submit();
}
