/*** BROWSER OBJECT ****************************************************************************************************************************/
window.offscreenBuffering = true;

function brwObj(){
	this.IE4plus = (document.all) ? true : false;
	this.IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
	this.IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
	this.IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
	this.isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
	this.IEmac = ((document.all)&&(this.isMac)) ? true : false;
	this.isIE = this.IE4plus || this.IE4 || this.IE5 || this.IE6 || this.IEmac;
	this.NS4 = (document.layers) ? true : false;
	this.NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1) ? true : false;
	this.isNS = this.NS4 || this.NS6;
	if (this.IE4plus){
		var start = navigator.appVersion.indexOf("MSIE");
		var end = navigator.appVersion.indexOf(".",start);
		this.IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
	}
	this.IE4minus = (this.IEMajor < 5) ? true : false;
	this.IE5plus = (this.IEMajor >= 5) ? true : false;
};
var brw = new brwObj();

/*** CSS OBJECT ********************************************************************************************************************************/
function cssObj(obj) {
	var o = (typeof obj == 'string') ? (document.getElementById)?document.getElementById(obj):(document.all)?document.all[obj]:document.layers[obj] : eval(obj);
	if(!o) return 0;
	if(o.getStyle) return o;
	o.getStyle = function (styleproperty) {
		switch(styleproperty){
			case 'bgColor':
				o.bgColor = (document.layers) ? this.document.bgColor.toUpperCase() : this.style.backgroundColor.toUpperCase();break;
			case 'bgImage':
				o.bgImage = (typeof(this.style.background) == 'object') ? this.style.background.src : (this.style.backgroundImage) ? this.style.backgroundImage.split('url(')[1].split(')')[0] : 'undefined';break;
			case 'visibility':
				o.visibility = (this.style.visibility == 'show' || this.style.visibility == 'visible') ? 'visible' : 'hidden';break;
			default:
				eval('o.'+styleproperty) = eval('this.style.'+styleproperty);break;
		}
		return eval(styleproperty);
	}
	o.setStyle = function (styleproperty,value) {
		switch(styleproperty){
			case 'bgColor':
				styleproperty =  (document.layers) ? 'document.bgColor' : 'backgroundColor';
				if(value == 'transparent' && document.layers) return this.document.bgColor = null;
				break;
			case 'bgImage':
				if(document.layers) return this.style.background.src = value;
				else return this.style.backgroundImage =  'url(' +value+ ')';
				break;
		}
		return eval('this.style.'+styleproperty+'= value');
	}
	return eval(o);
};

/*** functions *********************************************************************************************************************************/

function popup(location,w,h,winname,scrol) 
{	
	if (arguments.length == 1){
		newwin = window.open(location, "kayden_window");
	}
	else if (arguments.length == 5){
		var str = "width=" + w;
		str += ",height=" + h;
		str += ",status=no";
		str += ",menubar=no";
		str += ",toolbar=no";
		str += ",resizable=no";
		str += ",scrollbars=yes";
		newwin = window.open(location,winname,str);
	}
	else {
		var str = "width=" + w;
		str += ",height=" + h;
		str += ",status=no";
		str += ",menubar=no";
		str += ",toolbar=no";
		str += ",resizable=no";
		str += ",scrollbars=no";
		//str += ",left=100";
		//str += ",top=100";
		newwin = window.open(location,winname,str);
	}
	newwin.focus();
};

function partners_start(){
	document.getElementById('ptnr_inpage_idtxt').focus();
};
