

function newWindow(Curl, Cname, cWidth, cHeight) {
var int_windowLeft = (screen.width - cWidth) / 2;
var int_windowTop = (screen.height - cHeight) / 2;
var str_windowProperties = 'height=' + cHeight + ',width=' + cWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=no, resizable=no';
	var obj_window = window.open(Curl, Cname, str_windowProperties)
	if (parseInt(navigator.appVersion) >= 4) {
	  obj_window.window.focus();
	}
}
PEPS = {};
PEPS.rollover = {
   init: function() {
	  this.preload();
	  $(".roll").hover(
		 function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); },
		 function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
	  );
   },
   preload: function() {
	  $(window).bind('load', function() {
		 $('.roll').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(this).attr('src') ) ); });
	  });
   },
   newimage: function( src ) {
	  return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_on' + src.match(/(\.[a-z]+)$/)[0];
   },
   oldimage: function( src ) {
	  return src.replace(/_on\./, '.');
   }
};
// Tab Content
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab") thismenu = tabAnchor.item(i);
		else continue;
		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;
			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;
			return false;
		};
		if (!thismenu.container.first) thismenu.container.first = thismenu;
	}
	if (tabContainer.first) tabContainer.first.onclick();
}

//var cMenuID = 2; 
function selTabMenu(tabContainerID) {
//alert(cMenuID)
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var thismenu = tabAnchor.item(cMenuID - 1);
	thismenu.onclick();
}
function setTabMenu(tabContainerID, tabMenuNo) {
 document.getElementById(tabContainerID).getElementsByTagName("a").item(tabMenuNo-1).onclick();
}


// var name = "#quickMenu";
// var menuYloc = null;
jQuery(function($) {
//	menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
//	$(window).scroll(function () { 
//		offset = menuYloc+$(document).scrollTop()+"px";
//		$(name).animate({top:offset},{duration:500,queue:false});
//	});
//	$(function(){
//		$('a[href*=#]').click(function() {
//		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
//			&& location.hostname == this.hostname) {
//				var $target = $(this.hash);
//				$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
//				if ($target.length) {
//					var targetOffset = $target.offset().top;
//					$('html,body').animate({scrollTop: targetOffset}, 1000);
//					return false;
//				}
//			}
//		});
//	});
	$("input[type=text], input[type=password]").each(
		function() { $(this).css("width", $(this).attr('size') + '2px').addClass("box") }
	);
	$("input[type=image]").css("vertical-align", "middle");
	$("input[type=file]").addClass("file");
   	$('table.ev tbody td:nth-child(2)').addClass('cont');
	$("ul.sf-menu").superfish({ 
		pathClass:     'act',
		speed:         'normal',
		animation: {opacity:'show', height:'show'},   // slide-down effect without fade-in 
		disableHI	: false,
		delay: 1200              // 1.2 second delay on mouseout 
	});
	$("ul.sf-menu li.act img, ul.sf-menu a.act>img").each(
		function() { $(this).removeClass('roll').attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); }
	);
	$('.faqList, .fold').accordion({ header: 'div.title', active: 0});
	$('#my-dropdown').sSelect({ddMaxHeight: '100px'});
	//Larger thumbnail preview 
	$("ul.thumb li").hover(function() {
		$(this).find('div.bg').hide(200);
		$(this).css({'z-index' : '100'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-70px', 
				marginLeft: '-50px', 
				top: '50%', 
				left: '50%', 
				width: '120px', 
				height: '120px',
				padding: '20px'
			}, 200);
		
		} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('div.bg').show(400);
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '65px', 
				height: '80px', 
				padding: '5px'
			}, 400);
	});
	$("ul.cf_list li, ul.prod_list li").hover( function() { $(this).children().addClass("view"); }, function () { $(this).children().removeClass("view");});
	PEPS.rollover.init();


});

	function content_printer(id){
		print_content.document.open();
		print_content.document.writeln("<html><head><title>::¾àµµ ÇÁ¸°Æ®::</title></head><body>");
//		print_content.document.writeln(window.document.all.print_map.innerHTML);
//		print_content.document.writeln(window.document.getElementById("print_map").innerHTML);
//		alert(id);
		print_content.document.writeln(window.document.getElementById(id).innerHTML);
		print_content.document.writeln("</body></html>");
		print_content.document.close();
		print_content.document.execCommand("Print");
	}
	