
function verify(strPassword, id){

	var nUpperCount = strPassword.replace(/[^A-Z]/g, "").length;
	var nLowerCount = strPassword.replace(/[^a-z]/g,"").length;
	var nLowerUpperCount = nUpperCount + nLowerCount;
	var nNumberCount = strPassword.replace(/[^0-9]/g, "").length;
	var nCharacterCount = strPassword.replace(/[^!@#$%^&*?_~]/g, "").length;
	
	var strenght = 0;
	if (strPassword.length <= 4 && strPassword.length > 0) {
		strenght += 5;
	} else {
		if (strPassword.length >= 8) {
			strenght += 25;
		} else {
			if (strPassword.length > 0) {
				strenght += 10;
			}
		}
	}
	
	if (strPassword.length == nLowerCount && strPassword.length !=0) {
		strenght += 10;
	} else {
		if (nLowerUpperCount != 0) {
			strenght += 20;
		}
	}
	
	if (nNumberCount >= 3) {
		strenght += 20;
	} else {
		if (nNumberCount >= 1) {
			strenght += 10;
		}
	}
	
	if (nCharacterCount > 1) {
		strenght += 25;
	} else {
		if (nCharacterCount == 1) {
			strenght += 10;
		}
	}
	
	if (nNumberCount > 0 && nLowerCount > 0 && nUpperCount > 0 && nCharacterCount > 0) {
		strenght += 5;
	} else {
		if (nCharacterCount > 0 && nNumberCount > 0 && nLowerUpperCount > 0) {
			strenght += 3;
		} else {
			if (nNumberCount > 0 && nLowerUpperCount > 0) {
				strenght += 2;
			}
		}
	}
	
	
	document.getElementById(id).innerHTML = '<b>' + Math.round(strenght*100/95) + "%</b>";
	var color = Math.round(strenght*200/95);
	document.getElementById(id).style.color = 'rgb('+(200 - color)+','+color+',0)';
}


function show(id, value) {
      var obj = document.getElementById(id);
      var obj1 = document.getElementById(id+'1');
        if (value == "A"){
            obj.style.display = 'block';
            obj1.style.display = 'none';
        }
        if (value == "B"){
            obj.style.display = 'none';
            obj1.style.display = 'block';
        }
     

}
function load (scr, width, height) {
	var flashtag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="flash">'
						+'<param name="allowScriptAccess" value="sameDomain" />'
						+'<param name="allowFullScreen" value="false" />' 
						+'<param name="movie" value="' + scr + '" /><param name="menu" value="false" /><param name="quality" value="high" />'
						+'<embed src="' + scr + '" menu="false" quality="high" width="' + width + '" height="' + height + '" name="flash" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> '
					+'</object>';
	document.write(flashtag);
}
