function tagbrowser(doc){
	//johnathan kendall - 2007 
	//sets a series of classes related to browser profile 
	//get browser
	if(!document.getElementById)return false;
	var Tag='isDom';//is it a dom browser?
	if(window.getComputedStyle)Tag+=' isMoz';//opera reset after
	if(document.all){Tag+=' isIe';if(window.XMLHttpRequest){Tag+=' isIe7';}}//is ie then is ie7
	if(document.childNodes && !document.all && !navigator.taintEnabled && !navigator.accentColorName) Tag+=' isSaf';
	if(window.opera)Tag+=' isOp';	
	//get os
	var OSName='';
	if (navigator.appVersion.indexOf("Win")!=-1) OSName="isWin";
	if (navigator.appVersion.indexOf("Mac")!=-1) OSName="isMac";
	if (navigator.appVersion.indexOf("X11")!=-1) OSName="isUNIX";
	if (navigator.appVersion.indexOf("Linux")!=-1) OSName="isLin";
	if (navigator.appVersion.indexOf("iPhone") != -1) OSName="isIphone";
	if(OSName!=''){Tag+=' '+OSName;}	
	//get browser size
	var thewidth='w640';
	var w=document.documentElement.clientWidth;
	//alert(w);
	if(w>640){thewidth="w800";Tag+=' gtw640';}
	if(w>800){thewidth="w1024";Tag+=' gtw800';}
	if(w>1024){thewidth="w1280";Tag+=' gtw1024';}	
	if(w>1280){Tag+=' gtw1024'}	
	
	
	if(thewidth!=''){Tag+=' '+thewidth;}	
	//has flash
	var noautoinstall = "";
	if(navigator.appName == "Microsoft Internet Explorer" && (navigator.appVersion.indexOf("Mac") != -1 ||  navigator.appVersion.indexOf("3.1") != -1)){noautoinstall = "true";}
	if((navigator.plugins["Shockwave Flash"] || navigator.plugins["Shockwave Flash 2.0"])||(navigator.appName == "Microsoft Internet Explorer" && noautoinstall != "true")){Tag+=' hasFlash';}	
	
	if(document.height>window.innerHeight) Tag+=' hasScroll';
	
	//set style
	var t=document.getElementsByTagName('html');	
	
	t[0].className=Tag;//extra code for ie
	t[0].setAttribute('class',Tag);	
	
t[0].style.visibility='visible';
	//i[0].style.display="block";
	//alert(t[0].className);
	
}
window.onload=tagbrowser;
window.onresize=tagbrowser;




