//
// Javacscript Functions 
// IM - Digital Ink

// IE hover and PNG behaviours are
// relative to document rather than stylesheet
function behaviour_links () {
	// find out path of document
	fullpath = window.location.pathname.substring(0, location.pathname.lastIndexOf("/") + 1);

	// Get depth
	danumber = fullpath.split("/").length - 2;

	// Extra directory level on dev2
	if ((window.location.hostname.indexOf("dev2")) > -1) {
		danumber = danumber - 1 
	}

	var daPath = ""

	// Go up for each dir level
	for (var i=0; i<danumber;i++) {
		daPath += "../"
	}
	
	// return html
	var bh = "<style type=\"text/css\" media=\"all\"> img { behavior: url(" + daPath + "css/iepngfix.htc); } "
	bh += "body { behavior: url(" + daPath + "css/csshover.htc); } </style>"
	
	// Add link to ie6 stylesheet	
	bh += '<!--[if lte IE 6]><link href="' + daPath + 'css/ie6.css" rel="stylesheet" type="text/css" media="screen" /><![endif]-->'
	
	return bh
}
      	
      	