/*[common shortcuts]*/
var	d = document,
		iD = 'getElementById',
		tN = 'getElementsByTagName',
		cE = 'createElement',
		cN = 'className',
		aC = 'appendChild',
		gA = 'getAttribute',
		sA = 'setAttribute',
		iH = 'innerHTML',
		iO = 'indexOf';

/*[check string]*/
String.prototype.has = function (s) {
	var x;
	this.indexOf(s) != -1 ? x = true : x = false;
	return x;
};

String.prototype.is = function (s) {
	var x;
	this == s ? x = true : x = false;
	return x;
};

/*[print email address]*/
_em_link = function (name, label, subject, domain) {
	!domain ? dom = 'adside.com' : dom = domain+'.com';
	!label ? label = name + '@' + dom : label = label;
	!subject ? sbj = '' : sbj = '?Subject=' + subject; 
	document.write('<a href="mailto:' + name + '@' + dom + sbj + '">' + label + '</a>');
};

/*[print phone/fax number]*/
_pho_num = function (a, d3, d4, x) {
	a = a || '646';
	x ? x = ' ext. '+ x : x = '';
	document.write('<span style="white-space:nowrap;color:inherit !important;">1 (' + a + ') ' + d3 + '-' + d4 + x + '</span>');
};

/*[development]*/
var debug = false,
_log = function (msg) {
	if (typeof console != 'undefined') {
        console.log('['+ msg +']');
    } else	if (debug == true) {
		d.title += ' ['+ msg +']';
	}
};
