//flash
function swfprint(furl,fwidth,fheight,transoption)	{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ fwidth +'" height="' + fheight +'" align="middle">');
	document.write('<param name="movie" value="'+ furl +'"/>');
	document.write('<param name="base" value="."/>');
	if (transoption == "t")	{
		document.write('<param name="wmode" value="transparent"/>');
	} else if	(transoption == "o")	{
		document.write('<param name="wmode" value="opaque"/>');
	}
	document.write('<!-- Hixie method -->');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'"');
	if (transoption == "t")	{
		document.write(' wmode="transparent"');
	} else if	(transoption == "o")	{
		document.write(' wmode="opaque"');
	}
	document.write('></object>');
	document.write('<!--> <![endif]-->');
	document.write('</object>');
}
// quick
function getPosition(){
	var start, end, scale, term;
	start = parseInt (document.getElementById('quick').style.top, 10);
	end = document.documentElement.scrollTop + 230;
	term = 5;

	if ( start != end ) {
	scale = Math.ceil( Math.abs( end - start ) / 30 );
		if ( end < start )	scale = -scale;
		document.getElementById('quick').style.top = parseInt (document.getElementById('quick').style.top, 10)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}
function moveBanner() {
	document.getElementById('quick').style.top = document.documentElement.scrollTop + 50 + "px"; //¼ýÀÚ°¡ °°À¸¸é ½½¶óÀÌµå ¾ø´Ù.
	getPosition();00
	return true;
}
// quick_center
function initMoving(target) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = 0;
	obj.initLeft = 920;
	obj.bottomLimit = document.documentElement.scrollHeight - 0;
	obj.topLimit = 100;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
	obj.style.left = obj.left + "px";

	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 500;
		}
	}
	obj.move = setInterval(function() {
		pos = obj.getTop() + obj.getHeight() / 2 - 165;

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit
		if (pos < obj.topLimit)
			pos = obj.topLimit

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;

		obj.style.top = obj.top + "px";
	}, 40)
}

function change(val){
	if (val != ""){
		var win = window.open(val,'_blink');
		win.focus();
	}
}

//ÅÇ ·¹ÀÌ¾î
function contChange(obj,num,total) {
 if ( document.getElementById(obj+num).style.display == '' ) {
   document.getElementById(obj+num).style.display = 'none';
   return;
  }
 for (i=1; i<=total; i++) {
  if (i==num) {
   document.getElementById(obj+i).style.display = '';
  }
  else {
   document.getElementById(obj+i).style.display = 'none';
  }
 }
}

// RollOver
function imageOver(imgs) {
	imgs.src = imgs.src.replace("off.gif", "on.gif");
}
function imageOut(imgs) {
	imgs.src = imgs.src.replace("on.gif", "off.gif");
}

/* ÇöÀå»çÁø ImgRolling */

var ProductWidth = 564;                                    // »óÇ° ÇÏ³ª´ç ³ôÀÌ
var totalImgs = 134;
function listLeftScrolling() { // ¿ÞÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = document.getElementById("rolling_new");
	vProductList.scrollLeft = vProductList.scrollLeft - ProductWidth;
}

function listRightScrolling() { // ¿À¸¥ÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = documentgetElementById("rolling_new");
	if (totalImgs > 4 && vProductList.scrollLeft + ProductWidth < (ProductWidth*(totalImgs-3)))
		vProductList.scrollLeft = vProductList.scrollLeft + ProductWidth;
}

/* ÇöÀå»çÁø ImgRolling02 */

var ProductWidth = 564;                                    // »óÇ° ÇÏ³ª´ç ³ôÀÌ
var totalImgs = 134;
function listLeftScrolling02() { // ¿ÞÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = documentgetElementById("rolling_new02");
	vProductList.scrollLeft = vProductList.scrollLeft - ProductWidth;
}

function listRightScrolling02() { // ¿À¸¥ÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = document.getElementById("rolling_new02");
	if (totalImgs > 4 && vProductList.scrollLeft + ProductWidth < (ProductWidth*(totalImgs-3)))
		vProductList.scrollLeft = vProductList.scrollLeft + ProductWidth;
}
/* ÇöÀå»çÁø ImgRolling04 */

var ProductWidth = 564;                                    // »óÇ° ÇÏ³ª´ç ³ôÀÌ
var totalImgs = 141;
function listLeftScrolling04() { // ¿ÞÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = document.getElementById("rolling_new04");
	vProductList.scrollLeft = vProductList.scrollLeft - ProductWidth;
}

function listRightScrolling04() { // ¿À¸¥ÂÊ ÀÌµ¿ ¹öÆ° 
	vProductList = document.getElementById("rolling_new04");
	if (totalImgs > 4 && vProductList.scrollLeft + ProductWidth < (ProductWidth*(totalImgs-3)))
		vProductList.scrollLeft = vProductList.scrollLeft + ProductWidth;
}

/* ÇöÀå»çÁø º¸±â */
function prdLyrView(lid,n,total) {
    var ht = document.body.clientHeight; // if DTD is xhtml, document.documentElement.clientHeight;
    var target = document.getElementById(lid+n);

    if (total != 0)    {
        for (var i=1; i<=total; i++) {
            document.getElementById(lid+i).style.display = (i==n ? 'block':'none');
        }
        target.style.display = 'block';
    } 
}
function prdLyrView_02(lid,n,total) {
    var ht = document.body.clientHeight; // if DTD is xhtml, document.documentElement.clientHeight;
    var target = document.getElementById(lid+n);

    if (total != 0)    {
        for (var i=1; i<=total; i++) {
            document.getElementById(lid+i).style.display = (i==n ? 'block':'none');
        }
        target.style.display = 'block';
    } 
}

//ÆòÇü°è»ê±â
function layershow( icnt ) {
	document.getElementById("calculator"+icnt).style.display = "block";
}
function layerhidden( icnt ) {
	document.getElementById("calculator"+icnt).style.display = "none";
}

/**
 * prototype.js include
 */
document.write('<script type="text/javascript" src="/js/prototype.js"></script>');
document.write('<script type="text/javascript" src="/js/effects.js"></script>');

/**
 * page Move
 */
function fGoPageBoard(seq) {
	try {
		var d = document.forms[0];
		d.hPAGE.value = seq;
		d.submit();
	} catch(e) { alert(e) }
}

/**
 * ¿ìÃø Äü ¸µÅ©
 */

function quick01() {
	location.href = '/sell/calendar.asp';
}

function quick02() {
	location.href = '/model/index.asp';
}

function quick04() {
	location.href = '/proj/contract_index.asp';
}
