public static function isImageTypeSupported($reqtype) {
	    $supportByGD = array('jpg'=>'jpeg', 'jpeg'=>'jpeg', 'gif'=>'gif', 'png'=>'png');
	    $reqtype = strtolower($reqtype);
	
	    if (empty($supportByGD[$reqtype])) {
	        return false;
	    }
	
	    $type = $supportByGD[$reqtype];
	
	    if (function_exists('imagecreatefrom'.$type) && function_exists('image'.$type)) {
	        return $type;
	    }
	
	    return false;
	}