function insertImageWithShadow(p_filepath,p_alt,p_w,p_h) {
	var str = "<table border='0' cellpadding='0' cellspacing='0'>" +
			"<tr valign='top'>"+
			"<td><img src='"+p_filepath+"' alt='" +p_alt+ "' width='"+p_w+"' height='"+p_h+"' border='0'/></td>"+
			"<td width='6'><img src='images/shadow_tr.gif' width='6' height='6'/><br/><img src='images/shadow_r.gif' width='6' height='"+ (p_h-6) +"'/></td>"+
			"</tr><tr>"+
			"<td colspan='2'><img src='images/shadow_bl.gif' width='6' height='6'><img src='images/shadow_b.gif' width='"+ (p_w-6) +"' height='6'><img src='images/shadow_br.gif' width='6' height='6'/></td>"+
			"</tr></table>";

	document.write(str);
}

function txtBoxFocus()
{
	document.iLevelForm.txtSrchQuery.focus();
}

function submitOnEnter(e) {
	var keynum
	
	if(window.event) // IE
	{
		keynum = e.keyCode
		if(keynum == 13)
		{
			document.getElementById('lnkSrchGo').click();
			return false;
		}
		
	}
	else if(e.which) // Netscape/Firefox/Opera
	{
		keynum = e.which
		if(keynum == 13)
		{
			javascript:__doPostBack('lnkSrchGo','')
			return false;
		}
	}
	return true;
}

function generateURL() {
	alert('what the heck')
	var linkbox = document.getElementById('srchURL');
	if(linkbox.style.display == "none")
	{
		linkbox.style.display = 'block';
	}
}

function opacity(id, opacStart, opacEnd, millisec, count) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
	
	if(document.getElementById(id).style.display == 'block')
	{
	    document.getElementById(id).style.display = 'none';
	}
	else
	{
	    var i = 0;
	    var divids = "";
	    for(i=0;i<count;i++)
	    {
	        divids = "faq" + i;
	        document.getElementById(divids).style.display = 'none';
	    }
	    document.getElementById(id).style.display = 'block';
	}
	    
	document.getElementById(id).style.top = '0';
	document.getElementById(id).style.left = '0';
    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 

// buynow
function openMap(url) {
	window.open(url,"_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=550, height=600")	
}