function showUploading()
{
document.getElementById('uploading').style.display="block";
document.getElementById('frm').style.display="none";
}

function isUrl(s) {
var regexp = /(http):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
return regexp.test(s);
}

function isJpg(s) {
var regexp = /.*(jpg|JPG|jpeg|JPEG).*/
return regexp.test(s);
}

function isGif(s) {
var regexp = /.*(GIF|gif).*/
return regexp.test(s);
}

function isPng(s) {
var regexp = /.*(PNG|png).*/
return regexp.test(s);
}
    
function verifyThis(obj)
{
if(isJpg(obj.fileupload.value))
{
showUploading();
return true;
}
else
{
alert("Only image files (JPEG) are allowed!");
return false;
}
}
function verify_URL_form(obj)
{
if(isUrl(obj.value))
{
showUploading();
return true;
}
else
{
alert("Incorrect URL!");
return false;
}

}