function browseIt() {
	this.ver = navigator.appVersion.toLowerCase();
	this.verNum = parseInt(this.ver);
	this.agent = navigator.userAgent.toLowerCase();
	this.dom = (document.getElementById ? 1 : 0);
	this.opera = (this.agent.indexOf("opera") > -1 && this.dom ? 1 : 0);
	this.opera7 = (this.opera && this.verNum >= 7);
	this.opera9 = (this.opera && this.verNum >= 9);
	this.ie = (this.ver.indexOf("msie") > -1 && this.dom && !this.opera ? 1 : 0);
	this.webkit = this.ver.indexOf("applewebkit") > -1;
	this.chrome = this.ver.indexOf("chrome") > -1;
	this.safari = this.chrome ? false : this.ver.indexOf("safari") > -1;
	this.ieVer = 0;
	if (this.ie) {
		var pos = this.ver.indexOf("msie");
		if (pos != -1)
			this.ieVer = parseFloat(this.ver.substr(pos + 5));
	}
	this.ie6 = (this.ie && (this.ieVer >= 6));
	this.ie6only = (this.ie && (this.ieVer >= 6) && (this.ieVer < 7));
	this.ie7 = (this.ie && (this.ieVer >= 7));
	this.macOS = (this.agent.indexOf("mac") > -1);
	this.mac = (this.macOS && this.verNum >= 7 ? 1 : 0);
	this.moz = (this.agent.indexOf("gecko") > -1);
	this.ns6 = (this.dom && this.agent.indexOf("netscape") > -1 && this.verNum >= 5 ? 1 : 0);
	this.ff = (this.agent.indexOf("firefox") > -1);
	this.b = (this.ie || this.ns6 || this.opera7 || this.mac || this.moz || this.dom);

	return this;
}

var b = new browseIt();

function addFavorites (bookmark) {
    b = new browseIt();
    if(b.ie) {
        window.external.AddFavorite(document.location.href, document.title);
        return false;
    }else if(b.moz||b.ns6||b.opera) {
        $(bookmark).href  = document.location.href;
        $(bookmark).title = document.title;
        return false;
    }

    return false;
}

function smiles(code, field) {
    $(field).value = $(field).value + ' ' + code;
}
