
function popUp(theURL, Name, popW, popH, scroll) { 
		var winleft = (screen.width - popW) / 2;
		var winUp = (screen.height - popH) / 2;
		winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
		Win = window.open(theURL, Name, winProp)
		if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

function addToFavorites(url,title) {
	
	if (window.external) { 
		window.external.AddFavorite(urlAddress,pageName);
	} else { 
		alert("Sorry! Your browser doesn't support this function."); 
	}
}

function verify_country(country,stateID) {
	
	var state = document.getElementById(stateID);
	if(state) {
		if(country.options[country.selectedIndex].text == "United States of America") {
			state.disabled = false;
		} else {
			state.disabled = true;
		}
	}
	
}


function SelectDisabled(dropdown,msg) {
	
	if (dropdown.options[dropdown.selectedIndex].disabled) {
		alert(msg);
		dropdown.selectedIndex = 0;
	}
	
}


function accept() {
		if(document.forms[0].agree.checked) {
			return true;
		} else {
			alert('You must accept our Terms and Conditions');
			return false;

		}
	}


function toggle(element) {
   var show = document.getElementById(element);
   show.style.display = (show.style.display == "none" ? "" : "none");	
 }
 
 

function resize_pic() {
	
      if (window.innerWidth) {
		  
		     iWidth = window.innerWidth;
             iHeight = window.innerHeight;
			 
      } else {
		  
              iWidth = document.body.clientWidth;
              iHeight =document.body.clientHeight;
      }
              iWidth = document.images[0].width - iWidth;
              iHeight = document.images[0].height - iHeight;
              window.resizeBy(iWidth, iHeight);

}

function resize_win() {
		  
       //iWidth = document.body.clientWidth;
      // iHeight =document.body.clientHeight;
     
       iWidth = document.images.pic.width + document.images.thumb.width;
	   iHeight = document.images.pic.height + document.images.thumb.height;
       window.resizeTo(iWidth,iHeight);
	   self.moveTo((screen.width - iWidth) / 2,(screen.height - iHeight) / 2);
}