
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 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() {
		var form = document.forms[0];
		if(form.agree.checked) {
			form.finish.disabled = true;	
			form.finish.value = 'Processing, please wait...';
			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");	
 }
 
 
matchColumns=function(){ 

     var divs,contDivs,maxHeight,divHeight,d;	
     // get all <div> elements in the document 
     divs=document.getElementsByTagName('div'); 
     contDivs=[]; 

     // initialize maximum height value 
     maxHeight=0; 

     // iterate over all <div> elements in the document 

     for(var i=0;i<divs.length;i++){ 

          // make collection with <div> elements with class attribute 'container' 
          if(/\bcolumn\b/.test(divs[i].className)){ 

                d=divs[i]; 
                contDivs[contDivs.length]=d; 

                // determine height for <div> element 
                if(d.offsetHeight){ 
                     divHeight=d.offsetHeight; 
                } 

                else if(d.style.pixelHeight){ 
                     divHeight=d.style.pixelHeight;		 

                } 

                // calculate maximum height 
                maxHeight=Math.max(maxHeight,divHeight); 

          } 

     } 

     // assign maximum height value to all of container <div> elements 
     for(var i=0;i<contDivs.length;i++){ 
          contDivs[i].style.height=maxHeight + "px"; 
     } 

} 

// Runs the script when page loads 
window.onload=function(){ 

     if(document.getElementsByTagName){ 
          matchColumns();

     } 

} 


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);
}