$(document).ready(function()
{ // lib starting
	
	// ajax progress bar
	$('#ajaxloading').hide();
	$("#ajaxloading").bind("ajaxSend", function(){
 $(this).show();
 }).bind("ajaxComplete", function(){
 $(this).hide();
 });
	
// fix column
//var left_column = $('#col-one').height(); 
//var right_column = $('#col-two').height(); 
//var middle_column = $('#col-middle').height(); 
//
//if(right_column > left_column) { 
//    $('#col-one').height(right_column); 
//  }
//if(left_column > right_column) { 
//    $('#col-two').height(left_column); 
//  } 
//		
//if (middle_column > left_column || middle_column > right_column)
//{
//	$('#col-one').height(middle_column);
//	$('#col-two').height(middle_column); 
//}

//var $els = $("#col-one, #col-middle, #col-two").equalizeCols();
	
// requires jquery.onfontresize.js
//$(document).bind("fontresize", function () {
//	$els.equalizeCols();
//});

// load floating banners

JSFX_FloatDiv("fad_TopLeft",     4,  10).flt();
JSFX_FloatDiv("fad_TopRight", 	  screen.width-160,  10).flt();
JSFX_FloatDiv("fad_BottomLeft",  4, 330).flt();
JSFX_FloatDiv("fad_BottomRight", screen.width-160, 330).flt();


// floating banner close btns
$('#fbl1').click(function() {
$('#fad_TopLeft').hide();
})

$
('#fbl2').click(function() {
$('#fad_BottomLeft').hide();
})

$('#fbr1').click(function() {
$('#fad_TopRight').hide();
})

$('#fbr2').click(function() {
$('#fad_BottomRight').hide();
})



}); // lib ending


// loading on body load // no recommend
function main_lib_functions()
{

}



function rs(n,m,w,h)
{
	var remote = null;
	remote = window.open(m, n, 'width=' + w + ',height=' + h +',resizable=no,scrollbars=1');
	if (remote != null)
	{
		if (remote.opener == null)
		remote.opener = self;
		window.name = '6rbtop';
		remote.location.href = m;
	}
}


// floating banners
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
	el.init=false;
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		if(!this.init)
		{
			this.init=true;
			this.cx = pX+this.sx;
			this.cy = pY+this.sy;
		}
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.flt()", 0);
	}
	return el;
}