
function navRoll(obj,on)
{
	if(on) {
		obj.style.backgroundColor='#ffe4b8';
	} else {
		obj.style.backgroundColor='#fff1db';
	}
}

function navRollPtr(obj,on)
{
	if(on) {
		obj.style.backgroundImage='url(/images/nav_ptr2.gif)';
		obj.style.backgroundColor='#e6cb9f';
	} else {
		obj.style.backgroundImage='url(/images/spacer.gif)';
		obj.style.backgroundColor='#ffe4b8';
	}
}

function go(page,newwin)
{
	if(page) {
		if(newwin) {
			window.open(page);
		} else {
			location.href=page;
		}
	}
}

function opencertdetails()
{
	thewindow = window.open('http://www.claredi.com/public/certdetails.php?username=Dentrix',
		'windowname', config='height=400,width=450,' +
		'toolbar=no,menubar=no,' +
		'scrollbars=yes,resizable=yes,' +
		'location=no,directories=no,status=yes');
}

function ptrRoll(name)
{
	var img = document.images[name];
	var x=(img.prevSrc?0:1);
	img.src=img.src.replace(/_\d/,"_"+x);
	img.prevSrc=x;
}

function navSymRoll(name,x)
{
	var img = document.images[name];
	if(x==img.prevSrc) { return; }
	var x=(img.prevSrc?0:1);
	img.src=img.src.replace(/_\d/,"_"+x);
	img.prevSrc=x;
}


function cross_obj(id,styles,framenum)
{
	var obj, obj_base;
	if(cross_obj.arguments.length==3) {
		obj_base = window.parent.frames[framenum].document;
	}
	else
		obj_base = window.document;
	if(cross_obj.arguments[1]!=0) styles=true;
	//alert(styles);
	if(document.all)
		if(styles) { obj=obj_base.all[id].style; }
		else obj=obj_base.all[id];
	else if(document.layers)
		obj=obj_base.layers[id];
	else if(document.getElementById)
		if(styles) obj=obj_base.getElementById(id).style;
		else obj=obj_base.getElementById(id);
	else return false;
	if(obj) return obj;
	else return false;
}

function openWindow(url, width, height, type, winName) {
	var paramStr="";
	if (type=="console") {
		paramStr="resizable,height="+height+",width="+width;
	} else if (type=="fixed") {
		paramStr="status,height="+height+",width="+width;
	} else if (type=="content") { // fixed size with scrolling
		paramStr="scrollbars,status,height="+height+",width="+width;
	} else if (type=="normal") { // a normal window but with width & height set
		paramStr="status,toolbar,menubar,scrollbars,resizable,location,height="+height+",width="+width;
	} else if(!type || type=="flexible") { // default
		paramStr="scrollbars,resizable,height="+height+",width="+width;
	}
	if(!winName) { // make unique but consistent window name for this page
		winName = 'myWin_'+url.substr(0,url.indexOf("?")).replace(/\W/g,"");
	}
	winObj = window.open(url, winName, paramStr);
	winObj.focus();
	return winObj;
}

function openAWindow(url,winName,winParams){
    winObj = window.open(url,winName,winParams);
    winObj.focus();
    return winObj;
}

function openLargeView(img,w,h)
{
	openWindow('/detail.asp?img='+img,0+w+50,0+h+35);
}

function openMoreInfo(a)
{
	if(!a) { a=""; }
	var obj = openWindow('/forms/formats.asp'+a,675,500,'content');
	obj.focus();
}