var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;

d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );

if ( !d.layers ){
	dom = ( d.getElementById );
	op = ( nua.indexOf( 'Opera' ) != -1 );
	konq = ( nua.indexOf( 'Konqueror' ) != -1 );
	saf = ( nua.indexOf( 'Safari' ) != -1 );
	moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
	ie = ( d.all && !op );
	ie4 = ( ie && !dom );

	/*
	ie5x tests only for functionality. ( dom||ie5x ) would be default settings. 
	Opera will register true in this test if set to identify as IE 5
	*/

	ie5x = ( d.all && dom );
	ie5mac = ( mac && ie5x );
	ie5xwin = ( win && ie5x );
}

function browser_css( ) {
	d = document;// shorthand so we don't have to write out document each time..
	if ( saf ) {
		d.write('<link rel = "stylesheet" type = "text\/css" href = "/dynamic/css/safari.css" />');
	}
}

function browser_size(loc) {
	d = document;// shorthand so we don't have to write out document each time..
	if ( saf ) {
		window.open(loc,'dynamicPop','scrollbars=no,menubar=no,height=647,width=975,resizable=no,toolbar=no,location=no,status=yes');
	}
	else {
		window.open(loc,'dynamicPop','scrollbars=no,menubar=no,height=630,width=975,resizable=no,toolbar=no,location=no,status=yes');
	}
}

function browser_html(loc) {
	d = document;// shorthand so we don't have to write out document each time..
	if ( saf ) {
		window.open(loc,'dynamicPop','scrollbars=yes,menubar=no,height=670,width=975,resizable=no,toolbar=no,location=no,status=yes');
	}
	else {
		window.open(loc,'dynamicPop','scrollbars=yes,menubar=no,height=633,width=975,resizable=no,toolbar=no,location=no,status=yes');
	}
}
