function popup(mylink, windowname)
{
	if (! window.focus)
		return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
	return false;
}

function displayinstruction(action)
{
	switch(action)
	{
		case "checkseccode":
		{
			document.getElementById('instruction').innerHTML = "Type the characters you see in the picture.";
			break;
		}
		case "checkusername":
		{
			document.getElementById('instruction').innerHTML = "Username can contain only letters, numbers, hyphens (-), or underscores (_).";
			break;
		}
		case "checkpassword":
		{
			document.getElementById('instruction').innerHTML = "The password must contain at least six characters and is case sensitive.";
			break;
		}
		case "checkitem":
		{
			document.getElementById('instruction').innerHTML = "Choose the mobile phone that you are using.";
			break;
		}
		case "checkpassword2":
		{
			document.getElementById('instruction').innerHTML = "Retype Your Password.";
			break;
		}
		case "checkemail":
		{
			document.getElementById('instruction').innerHTML = "Please use a valid e-mail address and make sure your e-mail account is not full or disabled. ";
			break;
		}

	}
}
function rand(n)
{
  return ( Math.floor ( Math.random( )*n+1) );
}
function changesecurecode()
{
	document.getElementById("imgCaptcha").src='create_captcha.php?im_rand='+ Math.floor(Math.random() *1000000 + 1); 
	document.getElementById('checkseccode').innerHTML = "";
}
