/*
function include_dom() {
	alert(ua);
    return false;
}
include_dom();
*/

function ajax_set_form_params(formData) {
	formData.push({name: 'ajax', value: '1'});
	return true;
}

function initNav2(num){
	$(".cnt_nav").hide();
	$(".cnt_nav:eq("+num+")").show();
	$(".cnt_nav:eq("+num+")").prev(".hdr2").hide();
	$(".hdr2").each(function(){
	  $(this).attr('index',$(".hdr2").index(this));
	  $(this).click(function(){
		$(".hdr2").show();
		$(".cnt_nav").hide();
		$(this).next().show();
		$(this).hide();
		$.getIfModified("/xsys_menu_nav.php?set_menu_index="+$(this).attr('index'));
		return false
	  });
	});
}

function scrollToText(str){
	obj = document.getElementById(str);
	var curtop = 0;
	if(obj.offsetParent)
	while(1){
		curtop += obj.offsetTop;
		if(!obj.offsetParent) break;
		obj = obj.offsetParent;
	}
	else if(obj.y) curtop += obj.y;
	
	window.scrollTo('0', curtop);
}

function move_center_overflow_div(){
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth;
	myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	myWidth = document.body.clientWidth;
	myHeight = document.body.clientHeight;
	}
	if (navigator.appName == "Microsoft Internet Explorer"){
		var positiony = document.body.scrollTop;
		var positionx = document.body.scrollLeft;
	}
	else {
		var positiony = window.pageYOffset;
		var positionx = window.pageXOffset;
	}
	positiony = positiony + Math.round(myHeight/2) - 50;
	positionx = positionx + Math.round(myWidth/2) - 150;
	$('#overlay_feedback').css('top',positiony + 'px');
	$('#overlay_feedback').css('left',positionx + 'px');
}

function show_feedback(text){
	$("#overlay_inn").html(text);
	move_center_overflow_div();
	$("#overlay_feedback").DropInUp(1500, function(){
		$(this).animate({ opacity: 100 }, 1000, function(){
			$(this).DropOutUp(1500);
		});
	});
}


//For Homepage Sections description

function changeLabel(id,newtext)
{
document.getElementById(id).innerHTML=newtext
}

