	var PreobjType = "";
	var PreobjrcType = "";
	var Preobjj_idx = "";

	var JobPreview = {
		PREVIEW : function(objType, rcType, j_idx){
			if(PreobjType != "" && PreobjType + PreobjrcType + Preobjj_idx != objType + rcType + j_idx){
				PreviewiFrame.Change(PreobjType, PreobjrcType, Preobjj_idx);
			}
			PreviewiFrame.LayerView(objType, rcType, j_idx);
			PreviewiFrame.ObjValChk(objType,  rcType, j_idx);
		}
	};

	//Job Iframe control
	var PreviewiFrame = {
		ObjValChk : function (objType, rcType, j_idx){
			PreobjType = objType;
			PreobjrcType = rcType;
			Preobjj_idx = j_idx;
		},
		LayerView : function (objType, rcType, j_idx) {
			if(PreviewiFrame.ObjectChk(objType+rcType+j_idx)){
				if(PreviewiFrame._GetElementId(objType+rcType+j_idx).style.display == "block"){
					PreviewiFrame._GetElementId(objType+rcType+j_idx).style.display = "none";
					PreviewiFrame._GetElementId(objType+"Td"+rcType+j_idx).src = "http://image.alba.kr/comm/quickView_icon_open.gif";
				}
				else{
					PreviewiFrame._GetElementId(objType+rcType+j_idx).style.display = "block";
					PreviewiFrame._GetElementId(objType+"Td"+rcType+j_idx).src = "http://image.alba.kr/comm/quickView_icon_close.gif";

					PreviewiFrame.IframeSrc(objType+rcType+j_idx, rcType, j_idx);
				}
			}
			else{
				alert("½ºÅ©¸³Æ® ¿À·ù°¡ ÀÖ½À´Ï´Ù. »õ·Î°íÄ§ ÈÄ ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.");
			}
		},
		IframeSrc : function(objType, rcType, j_idx){
			if(PreviewiFrame.ObjectChk(objType)){
				PreviewiFrame._GetElementId(objType).src = "/alba/alba_preview_job.asp?rcType=" + rcType + "&j_idx=" + j_idx;
			}
		},
		ObjectChk : function(objType){
			try{
				var target = PreviewiFrame._GetElementId(objType);
				if(target == null){
					return false;
				}
				if(typeof(target) == "object"){
					return true;
				}
				else{
					return false;
				}
			}
			catch(e){
				return false;
			}
		},
		Change : function(objType, rcType, j_idx){
			PreviewiFrame._GetElementId(objType+rcType+j_idx).style.display = "none";
			PreviewiFrame._GetElementId(objType+"Td"+rcType+j_idx).src = "http://image.alba.kr/comm/quickView_icon_open.gif";
		},
		Exit : function(){
			PreviewiFrame.Change(PreobjType,PreobjrcType,Preobjj_idx);
		},
		_GetElementId : function(val){
		return document.getElementById(val);
		}
	};
	
	