/*-------------------------------------------------------------------------*/
function generateEmailLink(n,d) {
	var username = n;
	var hostname = d;
	var linktext = n+"@"+d;
	document.write("<a hr"+"ef=" + "mai"+"l" + "to:" + username +
	"@" + hostname + ">" + linktext + "</"+"a>")
}
/*-------------------------------------------------------------------------*/
$(function(){
/*-----External Links-----*/
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     	 anchor.target = "_blank";
 } 

/*-----Form button hover-----*/
		 var imgPath = '/img/';
		 var buttons = [
			"submit"
		 ];
		 for(i=0;i<buttons.length;i++){
				if($('#'+buttons[i])){
					$('#'+buttons[i]).hover(function() {
						 $(this).attr('src', imgPath+$(this).attr('id')+'-over.gif');
						 }, function() {
						 $(this).attr('src', imgPath+$(this).attr('id')+'.gif');
						 });
				};
		 };
	
	/*-----Nav detect-----*/
	var x = document.URL
	x = (x.split("/")[3]);
	x = (x.split(".")[0]);
	if(x==""){x="index"};
	$('#'+x+' a').addClass('current');
	
});
/*-------------------------------------------------------------------------*/
var trebuchet = {
    src: '/inc/flash/trebuchet.swf'
  };

  sIFR.useStyleCheck = true;
  sIFR.activate(trebuchet);

   sIFR.replace(trebuchet, {
    selector: '#content h1.seminar'
    ,css: [
      '.sIFR-root { color: #ff0101; font-weight: normal; }'
    ],wmode: 'transparent'
		,tuneHeight: -4
  });
   
   sIFR.replace(trebuchet, {
    selector: '#content h2.seminar'
    ,css: [
      '.sIFR-root { color: #4f4f4f; font-weight: bold; }'
    ],wmode: 'transparent'
		,tuneHeight: -4
  });
  
  sIFR.replace(trebuchet, {
    selector: '#content h1'
    ,css: [
      '.sIFR-root { color: #4f4f4f; font-weight: normal; }'
			,'a { color: #4f4f4f; text-decoration: none; }'
			,'a:hover { color: #ff9600; }'
			,'em { color:#ff0000; font-style:normal; }'
    ],wmode: 'transparent'
		,tuneHeight: -4
  });
	
	sIFR.replace(trebuchet, {
    selector: '#content h2'
    ,css: [
      '.sIFR-root { color: #4f4f4f; font-weight: normal; }'
			,'strong { font-style: normal; color: #FF2300; }'
			,'a { color: #4f4f4f; text-decoration: none; }'
			,'a:hover { color: #ff9600; text-decoration: none; }'
    ],wmode: 'transparent'
  });
	
	sIFR.replace(trebuchet, {
    selector: '#content h3'
    ,css: [
      '.sIFR-root { color: #4f4f4f; font-weight: normal; }'
			,'em { font-style: normal; font-style: italic; }'
			,'a { color: #FF2300; text-decoration: none; }'
			,'a:hover { color: #FF9600; text-decoration: none; }'
    ],wmode: 'transparent'
  });
	
	sIFR.replace(trebuchet, {
    selector: '.std-form label'
    ,css: [
      '.sIFR-root { color: #4f4f4f; font-weight: normal; }'
    ],wmode: 'transparent'
  });