
// Misc Functions
function stripslashes(str) {
	if (!str)
		return '';
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	str=str.replace(/\\\\/g,'\\');
	return str;
}

function in_array(string, array){
	for (i = 0; i < array.length; i++){
		if(array[i] == string){
			return true;
		}
	}
	return false;
}

// Empty ojbect checker
function isEmpty(obj) {
    for(var prop in obj) {
        if(obj.hasOwnProperty(prop))
        return false;
    }
    return true;
}
