 /**
 *  Copyright(ÀúÀÛ±Ç) Do Not Erase This Comment!!! (ÀÌ ÁÖ¼®¹®À» Áö¿ìÁö ¸»°Í)
 *
 *  In the case of modifing source, you should email to all the authors
 *  in the below author list for information ( such as all set of modified sources,
 *  information of modifications, etc..)
 *  If provided modifications are proved reasonable, we may update imgbutton.htc
 *  reflecting your ideas on modifications
 *  Furthermore, if your modifications are proved valuable, it is possible to add
 *  your information on the authors list under deliberation.
 *
 *  (Caution!) DO NOT redistribute without permission.
 *             Distribution to outside of LG CNS is NOT permitted.
 *
 *  ¼Ò½º¸¦ º¯°æÇÏ¿© »ç¿ëÇÏ´Â °æ¿ì ¾Æ·¡ÀÇ ÀúÀÚ ¸®½ºÆ®¿¡ µî·ÏµÈ ¸ðµç ÀúÀÛÀÚ¿¡°Ô
 *  º¯°æµÈ ¼Ò½º ÀüÃ¼¿Í º¯°æµÈ »çÇ×À» mail·Î ¾Ë·Á¾ß ÇÑ´Ù.
 *  ÀúÀÛÀÚ´Â Á¦°øµÈ ¼Ò½º°¡ À¯¿ëÇÏ´Ù°í ÆÇ´ÜµÇ´Â °æ¿ì ÇØ´ç »çÇ×À» ¹Ý¿µÇÒ ¼ö ÀÖ´Ù.
 *  Áß¿äÇÑ Idea¸¦ Á¦°øÇÏ¿´´Ù°í ÆÇ´ÜµÇ´Â °æ¿ì ÇùÀÇÇÏ¿¡ ÀúÀÚ List¿¡ ¹Ý¿µÇÒ ¼ö ÀÖ´Ù.
 *
 *  (ÁÖÀÇ!) ¿øÀúÀÚÀÇ Çã¶ô¾øÀÌ Àç¹èÆ÷ ÇÒ ¼ö ¾øÀ¸¸ç LG CNS ¿ÜºÎ·ÎÀÇ À¯ÃâÀ» ÇÏ¿©¼­´Â ¾ÈµÈ´Ù.
 *
 **
 * AUTHORS LIST       E-MAIL                   HOMEPAGE
 * TK Shin            tkyushin@lgcns.com       http://www.javatoy.net
 *
 **
 ** MODIFICATION HISTORY
 ** DATE       Version    DEVELOPER        DESCRIPTION
 ** 2006/02/06 0.8        Shin Tack Kyu    Initial Release
 **
 ** Detail Build HISTORY
 ** DATE        BUILD  DESCRIPTION
 ** 2006/02/06 a100   alpha Release
 */
var PRINT_URL = "http://img.shinhan.com/rib/ko/print/";
document.attachEvent ("onreadystatechange", function() {
   if (document.readyState=="complete")   {
      if (window.objectPatch) window.objectPatch();
   }
})
function objectPatch() {
	var os = document.getElementsByTagName("object");
	for (var idx=0; idx < os.length; idx++) {
		var peer = os[idx];
		var clsid = peer.getAttribute("classid");
		if (!clsid) continue;
		switch (clsid.toLowerCase()) {
			case "clsid:53EED863-B547-40F8-B24A-2D6DE807CFE8" :  // printmade
						var html = peer.outerHTML;
	  				peer.outerHTML = html;
	  				break;
	  	default:
	  				break;
	}
	}
}
/**
**	ÇÁ¸°Æ®¸ÞÀÌµå È£Ãâ ÇÔ¼ö
**
**	(ÁÖ)µðÀÚÀÎ¸ÞÀÌµå Designmade Co., Ltd
**	http://www.designmade.com
**	http://www.printmade.co.kr
**  
** HOSANG LEE - comager@designmade.com, comager@naver.com
**	Last Modify Date : 2006-09-29
**
**/
/*
with(document) {
	write("<object id=\"PrintMade\" codebase=\""+PRINT_URL+"Printmade.cab#version=1,0,0,0\" classid=\"clsid:53EED863-B547-40F8-B24A-2D6DE807CFE8\" width=0 height=0>");
	write("</object>");
}
*/
function print_all()
{
     try {
		 	var frameName = "";
			var wsValue="1024|0";
			var frm = 'parent';
		 //ÇÁ·¹ÀÓ ÀÚµ¿À¸·Î Ã£±â
		
			for(i=0;i<20;i++) {
				if(eval(frm).opener == undefined) eval(frm).opener = "";
				if(eval(frm).frames.name == "" || eval(frm).opener != "") {
					frameName += document.frames.name;
					break;
				} else {
					frameName = eval(frm+'.document.frames.name') + "/" + frameName;
					frm = frm + ".parent";
			    }
			 }

			// ÀÎ»çÃ¤¿ë °ü·Ã ÆäÀÌÁö »çÀÌÆ® Á¶Á¤ Attack 2007. 10.30
			var topUrl = "" + location ;
		
			if(eval(frm).opener) { //ÆË¾÷½Ã Ã¢Å©±â ÀÎ½Ä +20
				wsValue = (parseInt(eval(frm).document.body.clientWidth)+20)+"|0";
			}

			if( topUrl.indexOf("/company/employ/") >= 0 ){
           		PrintMade.Run(PRINT_URL + "/config.ini", "/ie:{ieh} /h:0 /lic:\"" + PRINT_URL + "/shinhan_com.lic\" /ffk:\"shinhan.com\" /ff:\"" + PRINT_URL + "/yangsic.xml\" /ws:"+wsValue+" /sc:0 /fid:" + frameName +" /cr:0|0|20|49");
			}
			else{
           		PrintMade.Run(PRINT_URL + "/config.ini", "/ie:{ieh} /h:0 /lic:\"" + PRINT_URL + "/shinhan_com.lic\" /ffk:\"shinhan.com\" /ff:\"" + PRINT_URL + "/yangsic.xml\" /ws:"+wsValue+" /sc:0 /fid:" + frameName +" /cr:0|0|100|90");
			}
     }
     catch(e)
	{
			alert("PrintMade°¡ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.");
     }
}
function print_employ()
{
     try {
		 	var frameName = "";
			var wsValue="1024|0";
			var frm = 'parent';
		 //ÇÁ·¹ÀÓ ÀÚµ¿À¸·Î Ã£±â
		
			for(i=0;i<20;i++) {
				if(eval(frm).opener == undefined) eval(frm).opener = "";
				if(eval(frm).frames.name == "" || eval(frm).opener != "") {
					frameName += document.frames.name;
					break;
				} else {
					frameName = eval(frm+'.document.frames.name') + "/" + frameName;
					frm = frm + ".parent";
			    }
			 }

			if(eval(frm).opener) { //ÆË¾÷½Ã Ã¢Å©±â ÀÎ½Ä +20
				wsValue = (parseInt(eval(frm).document.body.clientWidth)+20)+"|0";
			}

     		PrintMade.Run(PRINT_URL + "/config.ini", "/ie:{ieh} /h:0 /lic:\"" + PRINT_URL + "/shinhan_com.lic\" /ffk:\"shinhan.com\" /ff:\"" + PRINT_URL + "/yangsic.xml\" /ws:"+wsValue+" /sc:0 /fid:" + frameName +" /cr:218|310|20|130");
     }
     catch(e)
	{
			alert("PrintMade°¡ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.");
     }
}
function print_part() {
	try	{
		try{
			isFrame = top.contentframe.name;
			frameName = "contentframe";
		} catch(e) {
			frameName = "";
		}
		// PrintMade.Capture("printbody/body",0,0,0,103,240,350);		//µÚ·ÎºÎÅÍ 4°³°¡.. Á¦°Å »çÀÌÁî¼³Á¤..
	    PrintMade.Run(PRINT_URL + "/config.ini", "/ie:{ieh} /h:0 /lic:\"" + PRINT_URL + "/shinhan_com.lic\" /ffk:\"shinhan.com\" /ff:\"" + PRINT_URL + "/yangsic.xml\" /ws:1024|0 /sc:0 /fid:" + frameName);
	}
	catch (e)	{
		alert("PrintMade°¡ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.");
	}
}

function print_all_noframe()
{
     try {
           	PrintMade.Run(PRINT_URL + "/config.ini", "/ie:{ieh} /h:0 /lic:\"" + PRINT_URL + "/shinhan_com.lic\" /ffk:\"shinhan.com\" /ff:\"" + PRINT_URL + "/yangsic.xml\" /ws:"+wsValue+" /sc:0 /fid:" + frameName +" /cr:0|0|100|90");
     }
     catch(e)
	{
			alert("PrintMade°¡ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.");
     }
}

