function popup(url,x,y,target) {
	var popupWin = window.open(url,target,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width="+x+",height="+y);
	if ( popupWin ) popupWin.focus();
}


function SubmitForm (FormName) {
    document.forms[FormName].submit();
}

function Show(el) {
    var Element = document.getElementById(el);
    Element.style.display = Element.offsetWidth ? 'none' : 'block';
}

function showLogin(control_el,el) {
    var obj = document.getElementById(el);
    
    control_pos=getPosition(control_el);

    obj.style.left=control_pos.x-5+'px';
    obj.style.top=control_pos.y+25+'px';
    
    Show(el);
}

function getPosition(el) {
    var x = 0;
    var y = 0;
    do{
        x += el.offsetLeft;
        y += el.offsetTop;
    } while(el = el.offsetParent);
    
    return {x:x, y:y};
}
function test(){
	return false;
}
 function handleKeypress(dwnld_tooltip,sys_name,event, forma) {
 
 	 var form=document.forms[forma];	
	 form.onsubmit=test;
	switch(event.keyCode)
	{
		case 13:
		confirmationShow(dwnld_tooltip,sys_name);
		break;
		
	}
		
	return true;
}
document.onkeydown = function(event)
    {
    if (!document.getElementById) return;
    if (window.event) event = window.event;
	if (event.ctrlKey)
	    {
		var link = null;
		var href = null;
		switch (event.keyCode ? event.keyCode : event.which ? event.which : null)
		    {
			case 0x25:
				link = document.getElementById ('previous_page');
				break;
			case 0x27:
				link = document.getElementById ('next_page');
				break;

		    }
        if (link) document.location = link.href;
	    }
    }
jQuery('document').ready(function($){$('div.show_qnt a').click(function(e){
	var f=$(e.target.parentNode); f.find('input').attr('value',e.target.innerHTML); f.submit(); 
	});
});
