  function huntPop(id) {
    
    url = "huntpop.php?&id=" + id;
	
	window.open(url,"huntingdisplay","toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=465")
  
  }	
    function fishPop(id) {
    
    url = "fishpop.php?&id=" + id;
	
	window.open(url,"fishingdisplay","toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=465")
  
  }
  
  function cabinslodgePop(id) {
    
    url = "cabinslodgepop.php?&id=" + id;
	
	window.open(url,"cabinslodgedisplay","toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=465")
  
  }
function ThrowErrorPic(theimage,num){
		if(num ==1){
			theimage.src = "images/tourphotos/noimage.jpg";
		}else if(num==2){
			theimage.src = "images/NoImage_MEDIUM.gif";
		}else{
			theimage.src = "images/NoImage_ICON.gif";
		}

}
function ShowImageThumb(number,src,dir){
	if(dir==1){
		path='tourphotos';
		xadjust=20;yadjust=-125;
	}else if (dir ==2){
		path='tourphotos';
		xadjust=-370;yadjust=-125;
	}else if (dir ==3){
		path='large';
		xadjust=-72;yadjust=-15;
	}else{
		path='thumb';
		xadjust=-72;yadjust=-15;
	}
	thediv=document.getElementById('imgHolder');
	theimage=document.getElementById('imgHolderImage');
	if(number){
		//show
		theimage.src='images/'+path+'/'+src+'.jpg';
		//alert('cms/image_bank/'+path+'/'+src);
		thediv.style.left=document.cursorX+xadjust;
		thediv.style.top=document.cursorY+yadjust;
		thediv.className='ShowImageDiv';
				
	}else{
		//hide
		thediv.className='hiddenDiv';
	}


}
function ShowDn(num,nav,button,withwidget){
//alert(withwidget);
document.images[button].src=eval(nav+'_button_dn['+num+'].src');
if(withwidget !== ''){
//alert('fff'+withwidget+'ff');
	//document.images['widget0'].src= widget_dn[withwidget].src;
	document.images['widget' + num].src = widget_dn[withwidget].src;
}

}
function ShowUp(num,nav,button,withwidget){
document.images[button].src=eval(nav+'_button_up['+num+'].src');
if(withwidget  !== ''){
	document.images['widget' + num].src = widget_up[withwidget].src;
}
}


	 var cwin = null;
	 function openWin(theUrl, name, width, height, tools) {
	   cwin = window.open('', name,
	  tools+'width=' + width + ',height='+height);
	  if (cwin != null) {
	   if (cwin.opener == null)
	    cwin.opener = self;
	   cwin.location.href= theUrl;
	
	    cwin.focus();
	  }
	 }
	 function closeWin(theWin) {
	  theWin.close();
	 }
function show(object) 
  {
  if(navigator.vendor && navigator.vendor.indexOf("Apple") >=0){
  document.getElementById(object).style.display = 'inline-block';
  }else{
  document.getElementById(object).style.display = 'block';
  }
   
   document.getElementById(object).style.visibility = 'visible';
 
  }
           
 function hide(object) 
  {
  
   document.getElementById(object).style.display = 'none';
   document.getElementById(object).style.visibility = 'hidden';

  }
  function isEMailAddress(str)
{
		return isValidText(str,"^([\\w\\._-]+)@([\\w_-]+\\.)+([\\w_]+)$");
}


function getPosition(e) {
    e = e || window.event;
    var cursor = {x:0, y:0};
    if (e.pageX || e.pageY) {
        cursor.x = e.pageX;
        cursor.y = e.pageY;
    } 
    else {
        var de = document.documentElement;
        var b = document.body;
        cursor.x = e.clientX + 
            (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
        cursor.y = e.clientY + 
            (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
    }
    //return cursor;
	document.cursorX=cursor.x;
	document.cursorY=cursor.y;
}
document.onmousemove=getPosition;



function isValidText(str,regex)
{
	if (window.RegExp){
		if (typeof(regex)=='string')
			regex=new RegExp(regex);
		return regex.test(str);
	}else{
		window.alert("RegExp not available!");
		return true;
	}
}
function trim(s)
{
	if (typeof(s)=='string'){
		var i,len=s.length;
		for (i=len-1;i>=0 && s.charAt(i)<=' ';--i){}
		len=i+1;
		for (i=0;i<len && s.charAt(i)<=' ';++i){}
		if (i<len) s=s.substring(i,len);
		else s="";
	}
	return s;
}


function isNumber(str,allowFP)
{
	if (typeof(allowFP)=='undefined') allowFP=false;

	if (typeof(str)=='number'){
		if (allow_fp) return true;
		else return str==Math.floor(str);
	}

	if (typeof(str)!='string') return false;

 	str=trim(str);
	if (str.length==0) return false;

	var result=true;
	if (window.RegExp){
		var regstr="^[+-]?[0-9]*";
		if (allowFP) regstr+="\\.?[0-9]*([eE][+-]?[0-9]+)?";
		regstr+="$";
		var reg = new RegExp(regstr);
		result=reg.test(str);
	}else{
		result=false;
	}
	return result;
}

function isDate(str)
{
	var milliseconds=Date.parse(str);
	return !(isNaN(milliseconds));
}

function isZIPCode(str)
{
	return isValidText(str,"^\\d{5}(-\\d{4})?$");
}


function isExpirationDate(str)
{
	if (isValidText(str,"^\\d{1,2}/\\d{2}$"))
	{
		var month=parseInt(str.substring(0,2));
		var year=parseInt(str.substring(3));
		if (month>=1 && month<=12 && year>=0 && year<=99) return true;
		else return false;
	}else return false;
}

function isCreditCardNumber(str)
{
	return isValidText(str,"^\\d{12}(\\d{4})?$");
}


function isEMailAddress(str)
{
	return isValidText(str,"^([\\w\\._-]+)@([\\w_-]+\\.)+([\\w_]+)$");
}


function isPhoneNumber(str)
{
	return isValidText(str,"^\\(?\\d{3}\\)?[-\\. ]?\\d{3}[-\\. ]?\\d{4}$");
}


function isAlpha(str)
{
	return isValidText(str.toUpperCase(),"^[ABCDEFGHIJKLMNOPQRSTUVWXYZ]+$");
}



function isAlphaNumeric(str)
{
	return isValidText(str.toUpperCase(),"^[ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890]+$");
}


function isValidText(str,regex)
{
	if (window.RegExp){
		if (typeof(regex)=='string')
			regex=new RegExp(regex);
		return regex.test(str);
	}else{
		window.alert("RegExp not available!");
		return true;
	}
}


function isDefined(obj)
{
    if (obj==null || (""+eval("obj"))=="undefined"){
		return false;
	}else{
		return true;
	}
}

function isPresent(obj)
{
	if (trim(obj) == "") {
		return false;
		}
	else {
		return true;
		}
}
     function map() {
     window.open("map.php", "1", "width=490,height=434,resizable=no,scrollbars=no");
     } 





