function fStateSelected(state) {
	var coryTerritory=new Array();
	var scottTerritory=new Array();
	var otherTerritory=new Array();
	
	coryTerritory.push("Alabama")
	coryTerritory.push("American Samoa");
	coryTerritory.push("Arizona");
	coryTerritory.push("Arkansas");
	coryTerritory.push("California");
	coryTerritory.push("Colorado");
	coryTerritory.push("Delaware");
	coryTerritory.push("Florida");
	coryTerritory.push("Georgia");
	coryTerritory.push("Guam");
	coryTerritory.push("Kansas");
	coryTerritory.push("Louisiana");
	coryTerritory.push("Mississippi");
	coryTerritory.push("Missouri");
	coryTerritory.push("Nevada");
	coryTerritory.push("New Mexico");
	coryTerritory.push("North Carolina");
	coryTerritory.push("Northern Marianas Islands");
	coryTerritory.push("Oklahoma");
	coryTerritory.push("Puerto Rico");
	coryTerritory.push("South Dakota");
	coryTerritory.push("Texas");
	coryTerritory.push("Utah");
	coryTerritory.push("Virgin Islands");	
				
	scottTerritory.push("Alaska");
	scottTerritory.push("Connecticut");
	scottTerritory.push("District of Columbia");
	scottTerritory.push("Hawaii");
	scottTerritory.push("Idaho");
	scottTerritory.push("Illinois");
	scottTerritory.push("Indiana");
	scottTerritory.push("Iowa");		
	scottTerritory.push("Kentucky");
	scottTerritory.push("Maine");
	scottTerritory.push("Maryland");
	scottTerritory.push("Massachusetts");
	scottTerritory.push("Michigan");
	scottTerritory.push("Minnesota");
	scottTerritory.push("Montana");
	scottTerritory.push("Nebraska");
	scottTerritory.push("New Hampshire");
	scottTerritory.push("New Jersey");
	scottTerritory.push("New York");
	scottTerritory.push("North Dakota");
	scottTerritory.push("Ohio");
	scottTerritory.push("Oregon");
	scottTerritory.push("Pennsylvania");
	scottTerritory.push("Rhode Island");
	scottTerritory.push("South Carolina");
	scottTerritory.push("Tennessee");
	scottTerritory.push("Vermont");
	scottTerritory.push("Virginia");
	scottTerritory.push("Washington");
	scottTerritory.push("West Virginia");
	scottTerritory.push("Wisconsin");
	scottTerritory.push("Wyoming");
	
	//document.getElementById("salesperson").innerHTML = "";
	document.getElementById("corysales").style.display = "none";
	document.getElementById("scottsales").style.display = "none";
	
	var StateMatch = 0;
	
	for(x=0;x<coryTerritory.length;x++){
		if(coryTerritory[x] == state) {
			//document.getElementById("salesperson").innerHTML = "Please contact <a href=\"mailto:cory@ptcdental.com\">Cory Schwaderer</a> at (408) 621-2682.";
			document.getElementById("corysales").style.display = "block";
			var StateMatch = 1;
			break;
		}
	}	
	
	if(StateMatch == 0) {
		for(x=0;x<scottTerritory.length;x++){
			if(scottTerritory[x] == state) {
				//document.getElementById("salesperson").innerHTML = "Please contact <a href=\"mailto:scott.blair@ptcdental.com\">Scott Blair</a> at (800) 448-8855";
				document.getElementById("scottsales").style.display = "block";
				var StateMatch = 1;
				break;
			}
		}
	}	
}


function popupimage(url,image_width,image_height) {
	variables_ = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,' + 'width=' + image_width + ', height=' + image_height + ', screenX=150, screenY=150, top=150, left=150';
	window.open(url,'_blank',variables_)}

function setCounter( counter ) {
	document.getElementById('counter').value = counter;
}

function showMovie ( ) {
	//	Add the HTML code to show demo movie file in the 'movie' ID <div>		
	setCounter(0);	
	var t=setTimeout("checkHeight('grow')",50);	

}

function closeMovie() {
	setCounter(400);
	var oeTags = '';
	document.getElementById('movie').innerHTML = oeTags;	
	var t=setTimeout("checkHeight('shrink')",50);		
}

function checkHeight( action ) {
	var table_row = document.getElementById('movie-row');
	var table_table = document.getElementById('movie-table');
	
	if(action == 'grow'){
		var args = 400;	
		var counter = parseInt(document.getElementById('counter').value);
	
		if(counter < args){				
			counter=counter+20;
			document.getElementById('counter').value=counter;
			table_row.height = counter;
			table_table.height = counter;
			t=setTimeout("checkHeight('grow')",40);
		}else{
			insertMovie();
			/*var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'width="560" height="400"'
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<param name="movie" value="movies/saa-demo-2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
			+ '<embed src="movies/saa-demo-2.swf" quality="high" bgcolor="#ffffff" '
			+ 'width="560" height="400" name="saa-demo-2" align="middle"'
			+ 'play="true"'
			+ 'loop="false"'
			+ 'quality="high"'
			+ 'allowScriptAccess="sameDomain"'
			+ 'type="application/x-shockwave-flash"'
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '<\/embed>'
			+ '<\/object>';		
					
			document.getElementById('movie').innerHTML = oeTags;*/
		}
	}
	
	if(action == 'shrink'){
		var args = 0;	
		var counter = parseInt(document.getElementById('counter').value);
	
		if(counter > args){				
			counter=counter-20;
			document.getElementById('counter').value=counter;
			table_row.height = counter;
			table_table.height = counter;
			t=setTimeout("checkHeight('shrink')",40);
		}
	}
}

function sayHello(name) {
	alert(">> Hello " + name + ".");
	return ">> Hi Flash.";
}