function CheckCity()
	{
		if(document.formreg.kksubandsub.value < 1)
			{
				document.formreg.kksubandsub.style.display = 'none';
				document.formreg.cityname.style.display = '';
			}
		else 
			{
				document.formreg.kksubandsub.style.display = '';
				document.formreg.cityname.style.display = 'none';
			}
	}
function pausecomp(millis) 
	{
		var date = new Date();
		var curDate = null;	
		do { curDate = new Date(); } 
		while(curDate-date < millis);
	} 	
function updatestrengthpass( pw ) 
{ 
	var minimum = 4; 
	var fair = 6; 
	var strength_label = Array( 'Too short', 'Not security', 'Fine', 'Safety', 'Password Security', 'Good' ); 
	var strength_color = Array( 'FF0000', 'FF9900', 'FFCC33', '99CC99', '00CC33', '006600' ); 
	var strength_width = Array( '10', '20', '30', '50', '75', '100' ); 
	
	if(!pw){ var pw = document.getElementById('pass').value.toString(); } 
	if(!pw){ return false; } 
	var strength = 0; 
	if( pw.length >= minimum ) 
		{ 
			strength = 1; 
			if(pw.length >= fair)
				{ 
				strength++; 
				} 
			if(/\d+/g.test(pw))
				{ 
					strength++; 
				} 
			if(/\W+/g.test(pw))
				{ 
					strength++; 
				} 
			if(/[a-z]+/g.test(pw) && /[A-Z]+/g.test(pw))
				{ 
					strength++; 
				} 
		} 
document.getElementById('strength').innerHTML = strength_label[ strength ]; 
document.getElementById('strengthbar').style.backgroundColor = strength_color[ strength ]; 
document.getElementById('strengthbar').style.width = strength_width[ strength ]+'%'; 
} 	
function refreshImages()
	{
		random_num = (Math.round((Math.random()*1000)+1))
		document.all.imcode.src = "imgcode.php?code=" + random_num;
	}
	
	
