function changeImg(x, y) {
	if( compat ) {
		document.images[x].src=eval(y+'.src'); 
		}
	}
function emaildisclaimer()
		{
			window.open("/admin/emaildisclaimer.asp", "Disclaimer", "width=450,height=340,scrollbars");
		}
function privacy()
		{
			window.open("/pubs/privacy.asp", "Privacy", "width=450,height=430,scrollbars");
		}

function email(location, path)
		{
			var l = location.replace(/\*26/gi, '%26').replace(/\*3F/gi, '%3F').replace(/\*3D/gi, '%3D');
			l += escape(path);
//alert(l);			
//alert(escape(path));

			window.open(l, "Email", "width=500,height=590,scrollbars");
		}
function officetour(url)
		{
			window.open(url, "Tour", "width=530,height=223,scrollbars=false");
		}
function officeLargeTour(url)
		{
			window.open(url, "Tour", "width=800,height=480,scrollbars=false");
		}

function rollOnRow(rowobj)
{
	rowobj.style.backgroundColor = "#69849E";
}
function rollOffRow(rowobj)
{
	rowobj.style.backgroundColor = "#ffffff";
}

// <div class="formselect" onmouseover="resizeField('min', document.getElementById('category'));"><b>category: </b> 
// <select name="ycatfilt" id="category" class="fields" width="145" onmouseover="resizeField('max', this);this.focus();" onblur="resizeField('min', this);" onfocus="resizeField('max', this);"">
/*function resizeFieldWithRelative(dir, theField){
	if (theField != null) {
		if (dir == 'max') {
			var charLen = 6.5;
			var wLen = 0;
			for(var i=0; i<theField.options.length; i++) {
				if (theField.options[i].text.length > wLen) {
					wLen = theField.options[i].text.length
				}
			}
			theField.style.position = 'relative';
			var newwidth = wLen*charLen;
			if(theField.getAttribute("width") < newwidth){
       			if (newwidth < 286){
       				theField.style.width = newwidth;
       			}
       			else{
       				theField.style.width = 286;
       			}
			}
		} else {
			theField.style.position = 'relative';
			theField.style.width  = theField.getAttribute("width");
		}
    }
}
*/

// <div class="formselect" onmouseover="resizeField('min', document.getElementById('category'));"><b>category: </b> 
// <select name="ycatfilt" id="category" class="fields" width="145" onmouseover="resizeField('max', this);this.focus();" onblur="resizeField('min', this);" onfocus="resizeField('max', this);"">
//<!--select onmouseover="this.focus();resizeField('max', this);" onblur="resizeField('min', this);" onfocus="hidForm.value='';resizeField('max', this);" class="form1" name="cboPubsType" id="cboPubsType" runat="server"></select-->
function resizeField(dir, theField){
    if (dir == 'max') {
        var charLen = 6.5;
        var wLen = 0;
        for(var i=0; i < theField.options.length; i++) {
            if (theField.options[i].text.length > wLen) {
                wLen = theField.options[i].text.length
            }
        }
        
        if(wLen > 70) wLen = 70;
        
        theField.style.position = 'relative';
        theField.style.width  = theField.getAttribute("width");
        
        var prevwidth = parseInt(theField.currentStyle.width);
		var newwidth = wLen*charLen;

        theField.style.position = 'absolute';
		
		if(theField.getAttribute("width") < newwidth){
       		theField.style.width = newwidth;
		}
		
		theField.style.posLeft = prevwidth - newwidth;
    } else {
        theField.style.position = 'relative';
        theField.style.width  = theField.getAttribute("width");
        theField.style.posLeft = 0;
    }
}
function resizeFieldCareers(dir, theField){
    if (dir == 'max') {
        var charLen = 6.5;
        var wLen = 0;
        for(var i=0; i < theField.options.length; i++) {
            if (theField.options[i].text.length > wLen) {
                wLen = theField.options[i].text.length
            }
        }
        
        theField.style.position = 'relative';
        theField.style.width  = theField.getAttribute("width");
        
        var prevwidth = parseInt(theField.currentStyle.width);
		var newwidth = wLen*charLen;

        theField.style.position = 'absolute';
		
		if(theField.getAttribute("width") < newwidth){
       		theField.style.width = newwidth;
		}
		
		theField.style.posLeft = prevwidth - newwidth;
    } else {
        theField.style.position = 'relative';
        theField.style.width  = theField.getAttribute("width");
        theField.style.posLeft = 0;
    }
}

function piechart1(pie, slice)
{	
	window.open("popup_piechart.aspx?pie="+pie+"&slice="+slice,"piechart","width=700,height=450,status=0,location=0,scrollbars");
}

function piechart1NoOpen(pie, slice)
{	
	document.location = "popup_piechart.aspx?pie="+pie+"&slice="+slice;
}


function piechart2()
{
	window.open("/careers2/clients/popup_piechart.asp","piechart","width=700,height=450,status=0,location=0,scrollbars");
}
function testimonial(guid)
			{			window.open("testimonialmoredetail.aspx?guid="+guid,"testimonial","width=700,height=450,status=0,location=0,scrollbars");
			}
function commentary(exGuid, guid)
			{			window.open("casesdealsdetail.aspx?exGuid="+exGuid+"&guid="+guid,"commentary","width=700,height=450,status=0,location=0,scrollbars");
			}
function practice(guid)
			{			window.open("practiceorganizationdetail.aspx?guid="+guid,"practice","width=700,height=450,status=0,location=0,scrollbars");
			}

function practiceW(obj, guid)
{	
	window.open("practiceorganizationdetail.aspx?guid="+guid+"&practice="+escape(obj.innerText),"practice","width=700,height=450,status=0,location=0,scrollbars");
}

function practiceWNoOpen(obj, guid)
{	
	document.location.href ="practiceorganizationdetail.aspx?guid="+guid+"&practice="+escape(obj.innerText);
}

 function toggle(list,item){
			var listElementStyle=document.getElementById(list).style;
			if (listElementStyle.display=="none"){			   
			   //item.className = "list_minus";
			   listElementStyle.display="block";
			}else{						   
			   //item.className = "list_plus";
			   listElementStyle.display="none";
			}
	 }

// JavaScript Document