function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
setInterval("window.status='your message here'",10);
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
setInterval("window.status='your message here'",10);
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;


function space_deduct(str)
{
	var t="";
	var t1=" ";
	
	if(str=="")
		return t1;
	
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)==" ")
		{
			if(str.charAt(i+1)!=" ")
			{
				t=t+" "	+str.charAt(i+1);
				i=i+1;
			}
		}
		else
			t=t+str.charAt(i);
	
	}
	return t;
}
function check_number(str)
{
	var flag=0;	
	
		
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)=="1" || str.charAt(i)=="2" || str.charAt(i)=="3" || str.charAt(i)=="4" || str.charAt(i)=="5" || str.charAt(i)=="6" || str.charAt(i)=="7" || str.charAt(i)=="8" || str.charAt(i)=="9" || str.charAt(i)=="0" || str.charAt(i)=="." || str.charAt(i)=="/")
		{
			
			
		}
		else
			flag=1;
				
				
	}
	if(flag==1)
		return false;
	else	
		return true;
}
function check_onlynumber(str)
{
	var flag=0;	
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)=="1" || str.charAt(i)=="2" || str.charAt(i)=="3" || str.charAt(i)=="4" || str.charAt(i)=="5" || str.charAt(i)=="6" || str.charAt(i)=="7" || str.charAt(i)=="8" || str.charAt(i)=="9" || str.charAt(i)=="0")
		{
			
			
		}
		else
			flag=1;
	}
	if(flag==1)
		return false;
	else	
		return true;
}

function check_phone(str)
{
	var flag=0;	
	
		
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)=="1" || str.charAt(i)=="2" || str.charAt(i)=="3" || str.charAt(i)=="4" || str.charAt(i)=="5" || str.charAt(i)=="6" || str.charAt(i)=="7" || str.charAt(i)=="8" || str.charAt(i)=="9" || str.charAt(i)=="0" || str.charAt(i)=="+" || str.charAt(i)=="-" || str.charAt(i)=="." || str.charAt(i)==" ")
		{
			
			
		}
		else
			flag=1;
	}
	if(flag==1)
		return false;
	else	
		return true;
}
function check_email(str) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str))
	{
		return (true)
	}
	
	return (false)
}
function check_filetype(str)
{
	var path = str;
	var ext = path.split(".");
	
	if(ext[1]!='gif' && ext[1]!='jpg' && ext[1]!= 'jpeg' && ext[1]!= 'bmp' && ext[1]!= 'png')
	{
		return false;
	}
	else 
	{
		return true;
	}
}
function check_filesize(str)
{
	var im;
	im = new Image();
	im.src = str;

	if(im.height>100 && im.width>100)
	{
		return false;
	}
	else 
	{
		return true;
	}
}