

$(document).ready(function () {	


	$("a[rel='extranet_ohm']").colorbox({iframe:true, onClosed:function(){location.reload(true)}, innerWidth:1024, innerHeight:600,rel:'nofollow'});	

//	$("a[rel='photos_ohm']").colorbox({slideshow:true,slideshowSpeed:4000});


	$("a[rel='photos_ohm']").colorbox({
					maxWidth:	'100%', 
					maxHeight:	'100%'
					});


		$("a[rel='gallery_ohm']").colorbox({slideshow:true,slideshowSpeed:4000});

	
	$('#nav li').hover(
		function () {
			//show its submenu
			$('ul', this).slideDown(100);

		}, 
		function () {
			//hide its submenu
			$('ul', this).slideUp(100);			
		}
	);


	
	if (getQuerystring('action') == "add") {
		$(document).ready(function(){
			$('.warning').remove();
			$.get("../inc/token.asp",function(txt){
			  $(".secure").append('<input type="hidden" name="ts" value="'+txt+'" />');
			});
			firstFocus();
		
		});	
	}
	
});

	function GetActivityTypeQeA(id_lang,id_activity_type) {	

		var sUrl = 'inc/ajax_activity_type.asp?id_lang=' + id_lang + '&id_activity_type=' + id_activity_type;	
	
	//alert(sUrl);
		var html = $.ajax({
			type: "GET",
			contentType: "application/x-www-form-urlencoded;charset=ISO-8859-15",
			url: sUrl,
			async: false
		 }).responseText;
		 
		html	= html.split("|");

		 
		var activity_typeOne_QeA = document.getElementById('activity_typeOne_QeA');
		var activity_typeTwo_QeA = document.getElementById('activity_typeTwo_QeA');	
			
		activity_typeOne_QeA.innerHTML = html[0];
		activity_typeTwo_QeA.innerHTML = html[1];		 
	}
	
	function getQuerystring(key, default_)
	{
	  if (default_==null) default_=""; 
	  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
	  var qs = regex.exec(window.location.href);
	  if(qs == null)
	    return default_;
	  else
	    return qs[1];
	}
