<!--close right click in browser-->
	var message="Right click disabled."; //edit this message to say what you want
	
		function clickIE()
		{
		if (event.button==0) {alert(message); return false;}
		}
		function clickNS(e)
		{
		if (document.layers||(document.getElementById&&!document.all))
		{
		if (e.which==2||e.which==3)
		{
		alert(message);return false;
		}
		}
		}
		
		if(window.navigator.appName=="Netscape")
		{
		document.onmouseup=clickNS;
		document.oncontextmenu=clickIE;
		document.oncontextmenu=new Function("return false")
		}
		else if (window.navigator.appName=="Microsoft Internet Explorer")
		{
		document.oncontextmenu=clickIE;
		}
		else if (window.navigator.appName=="Opera")
		{
			
		}
		else if (document.layers)
		{
		document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
		}
		else
		{
		document.onmouseup=clickNS;
		document.oncontextmenu=clickIE;
		}
		
// JavaScript Document

 //Initialize first demo:
ddaccordion.init({
	headerclass: "mypets", //Shared CSS class name of headers group
	contentclass: "thepet", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 400, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
	onemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["closedlanguage", "openpet"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["prefix", "<img src='images/collapse1.png' /> ", "<img src='images/expand1.png' /> "], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "slow", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})

//Initialize 2nd demo:
ddaccordion.init({
	headerclass: "technology", //Shared CSS class name of headers group
	contentclass: "thelanguage", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["closedlanguage", "openlanguage"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["prefix", "<img src='images/collapse.png' /> ", "<img src='images/expand.png' /> "], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "slow", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})


function refreshCaptcha()
{
	//var img = document.images['captchaimg'];
	//img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
	var imgOne = document.images['captchaimgOne'];
	imgOne.src = imgOne.src.substring(0,imgOne.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
	var imgTwo = document.images['captchaimgTwo'];
	imgTwo.src = imgTwo.src.substring(0,imgTwo.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
}

 $(document).ready(function () {

$(".nav").hover(
  function () {
   $('#nav-bg').show();
   //alert($(this).attr('id'));
  },
  function () {
    $('#nav-bg').hide();
  });

$(".subnav").hover(
  function () {
   $('#nav-bg').show();
   var id = 'main-'+($(this).attr('id'));   
   $('#'+id).css({'color' : '#FFFFFF','background-image': 'url("images/menu-hover-bg.jpg")' });   
  },
  function () {
    $('#nav-bg').hide();
	 var id = 'main-'+($(this).attr('id'));   
	 var vclass = $('#'+id).attr('class'); 
	 if(vclass=='nav current')
	 	$('#'+id).css({'color' : '#3F7DB0','background-image': 'none' });   
	 else
	 	$('#'+id).css({'color' : '#000000','background-image': 'none' });   
  });
 
});
 
$(document).ready(function() {
			/*
			*   Examples - images
			*/
			
			$("a#example1").fancybox({
				'titleShow'		: false
			});

			$("a#example2").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});

			$("a#example3").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});

			$("a#example4").fancybox();

			$("a#example5").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example6").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'scrolling'   	: 'no',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				},
				'titlePosition' 	: 'outside'
			});

			/*
			*   Examples - various
			*/

			$("a#ver1").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});

			$("a#ver2").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});

			$("a#ver3").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});

			$("a#ver4").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});
			
			$("a#ver5").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'autoScale'		: false,
				'width'			: '732',
				'height'		: '432',
				'scrolling'   	: 'no'
			});
			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'titleShow'			: false,
				'transitionOut'		: 'none'
			});
			$("#various5").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'     	: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titleShow'			: false,
				'type'				: 'iframe'
			});
					
			$("#manual1").click(function() {
				$.fancybox({
					//'orig'			: $(this),
					'padding'		: 0,
					'href'			: 'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
					'title'   		: 'Lorem ipsum dolor sit amet',
					'transitionIn'	: 'elastic',
					'transitionOut'	: 'elastic'
				});
			});
			
			$("#manual2").click(function() {
				$.fancybox([
					'images/asp1.jpg',
					'images/asp2.jpg',
					{
						'href'	: 'images/asp3.jpg',
						'title'	: 'ASP Project'
					}
				], {
					'padding'			: 0,
					'transitionIn'		: 'none',
					'transitionOut'		: 'none',
					'type'              : 'image',
					'titleShow'			: true,
					'changeFade'        : 0
				});
			});
		});
