/* pasitioning
----------------------------------------------- */
window.onresize = function() { positioning(); }
window.onload = function() { positioning(); }

function positioning() {
	var nv = navigator.userAgent;
	var bt = document.getElementById("pgup");
	if (nv.match(new RegExp("MSIE 6", "i"))) { floatbt(); }
	else {
		bt.style.position = "fixed";
		bt.style.left = (document.body.offsetWidth / 2) + 386 + "px";
		bt.style.bottom = "100px";
	}
	try{ tabCheck(); }
	catch(e){}
}
function floatbt() {
	var bt = document.getElementById("pgup");
	bt.style.position = "absolute";
	bt.style.left = (document.body.offsetWidth / 2) + 375 + "px";
	bt.style.top = document.body.offsetHeight + document.body.scrollTop - 150 + "px";
	setTimeout("floatbt()", 10);
}


/* page up
----------------------------------------------- */
function pageup() {
	var mode = (document.compatMode && document.compatMode=="CSS1Compat");
	if (mode) { posi = document.documentElement.scrollHeight; }
	else { posi = document.body.scrollHeight; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	point = parseInt(position - move);
	scrollTo(0,point);
	if (point > 0) { setTimeout("moveObje(point)",1); }
}


/* jquery.js change table bgcolor
----------------------------------------------- */
$(document).ready(function() {
 $(".tableType05").each(function() {
  trs = $(this).children();
  $(trs).find("tr:even").addClass("changeTrBg");
 });
});


/* jquery.js window.open
----------------------------------------------- */
$(document).ready(function () {
	$('a[@href^="http"]').not('[@href^="http://www.bfc-con.com/"]').click(function() {
	window.open(this.href, '');
	return false;
	});
	$('a[@href^="http"]').not('[@href^="http://www.bfc-con.com/"]').addClass("exLink");
});

$(document).ready(function () {
	$('a[@href$=".pdf"]').click(function() {
	window.open(this.href, '_blank');
	return false;
	});
});

/* jquery.js tab changer
----------------------------------------------- */
$(document).ready(function() {
 //
 $(".tab/div").hide();
 var tabDefault = $(".tabDefault").attr("href").split("#");
 $(".tabDefault").parent().addClass("tabChoosed");
 $("#"+tabDefault[tabDefault.length-1]).show();
 //
 $(".tablist/li/a").click(function() {
  splitID = $(this).attr("href").split("#");
  targetID = "#"+splitID[splitID.length-1];
  $(".tab/div").hide();
  $(".tablist/li").removeClass();
  $(this).parent().addClass("tabChoosed");
  $(targetID).show();
  return false;
 });
});
