function getHelp(str){
document.getElementById('help').style.display = 'block';
}

function closeHelp(){
document.getElementById('help').style.display = 'none';
}


function capLock(e){
kc = e.keyCode?e.keyCode:e.which;
sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false);
if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk))
document.getElementById('divCaps').style.display = 'block';
else
document.getElementById('divCaps').style.display = 'none';
}

function maxi(obj, max_length){
	obj2 = document.getElementById('rem');
	obj2.value = max_length-obj.value.length;
	
	if (obj.value.length>max_length){
	obj.value=obj.value.substring(0,max_length)
		obj2.value = 0;
	}
}

function doChange(obj){
	window.location.href='?choice='+obj;
}

$(document).ready(function(){
		 
		$("#fancy, #fancy2").tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    opacity: 1, 
    fixPNG: true, 
    showBody: " - ", 
    extraClass: "pretty fancy", 
    top: -15, 
    left: 5 
}); 
 
$('#pretty').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    showBody: " - ", 
    extraClass: "pretty", 
    fixPNG: true, 
    opacity: 0.95, 
    left: -120 
});
		 
		 
		 $(".help").click(function(){
		
		var url   = $(this).attr('href');
		var page = 'page=' + $(this).attr('title');
		
		$("#help").css("display","block");

		$.ajax({
						method: "post",url: url, data: page,
						
						beforeSend: function(){ $("#help_body").html("loading..."); 
						}, //show loading just when link is clicked
						
						error: function(){
							$("#help_body").html('No page matches this request...');
						}, // display something when there is no match for the page...

						
						success: function(html){ //so, if data is retrieved, store it in html
						$("#help_body").html(html); //show the html inside #box div
						},
						
						complete: function(){ 
							
							}// Do something once done regardless of error or not...
			
					});// close ajax
		
		return false;
			
			
			});// close click

			function piclist()
{
max=piclist.arguments.length; for (i=0; i<max; i++) this[i]=piclist.arguments[i];
}



d=new piclist
	(
	"transparent url(\"/images/small/lucas_big.gif\") no-repeat",
	"transparent url(\"/images/small/knfilter_big.gif\") no-repeat",
	"transparent url(\"/images/small/rim_big.gif\") no-repeat"
	);



var x=0;

fdIn = function (str){
	
	$("#box").css("background", ""+d[x]+"");
	$("#box").css("display", "none");
	$("#box").fadeIn(3000);
	x++;
	if(x==max)
	x=0;
	setTimeout("fdOut("+x+")", 10000);
}	



fdOut = function (str){
	$("#two").css("background", ""+d[x]+"");
	$("#box").fadeOut(3000, function(){
	setTimeout("fdIn("+x+")", 50)
	});
}


fdIn();	
	});// close main

