function DeleteFolder2(info_type,return_page){ var x; x=top.Confirm('CONFIRM_FOLDER_DELETE'); if (x==true) { if(info_type!=""){ top.firstFrame.mainFRM.folders.document.location.href="http://www.iga-makeup.com//ic/infocenter/folders.aspx?mode=delete&info_type=" + info_type; top.LeaveMessage('items','top.reloadBin()'); // top.LeaveMessage('items','top.firstFrame.mainFRM.folders.document.location.href="http://www.iga-makeup.com//IC/infocenter/folders.aspx";'); top.LeaveMessage('folders','top.firstFrame.mainFRM.items.document.location.href="'+return_page +'";'); }else{ alert("Please Select A Folder!"); } } } function EditFolder2(info_type){ if(info_type!=""){ top.firstFrame.mainFRM.PropertiesFrame.document.body.innerHTML=""; top.firstFrame.mainFRM.PropertiesFrame.document.location.href="http://www.iga-makeup.com//IC/properties_type.aspx?info_type="+info_type +"&pop=true"; } } function popProp(obj){ var args; XDEX=document.all(obj).innerHTML; selectionTXT=document.body.createControlRange(); window.showModelessDialog("http://www.iga-makeup.com//IC/MJeditor/ImageBank/image_properties_D.asp?file_name="+XDEX,args,"dialogHeight: 130px; dialogWidth: 520px; dialogTop: 50px; dialogLeft: 500px; edge: Raised; center: Yes; help: No; resizable: No; status: No;"); } function OpenProperties(controlname, info_id){ top.firstFrame.mainFRM.parentEdit.rows='*,25px'; top.firstFrame.mainFRM.PropertiesFrame.document.location.href="http://www.iga-makeup.com//IC/properties.aspx?info_id="+info_id+ "&controlname=" +controlname; } function revertORG(field,info_id,obj){ obj.src='../app_images/WYSWIG_icons/revert2.gif'; if(top.Confirm("CONFIRM_REVERT")){ document.all(field+"@"+info_id).innerHTML=document.all(field+"_ORG_"+info_id).value; } obj.src='../app_images/WYSWIG_icons/revert.gif'; } function showSRC(field,info_id,obj){ objX=document.all(field +"@"+info_id); objY=document.all(field +"_src_"+info_id); objZ=document.all(field +"@"+info_id); objZ.style.display=='none' if(objY.style.display=='none'){ obj.src='../app_images/WYSWIG_icons/sourcecode2.gif' objY.value=objX.innerHTML; objY.style.display="inline"; objX.style.display="none"; }else{ obj.src='../app_images/WYSWIG_icons/sourcecode.gif' objX.innerHTML=objY.value objY.style.display="none"; objX.style.display="inline"; } } function update_content(info,info_id) { hideMenu(); top.update_panelFRM.document.all("info_id").value=info_id; top.update_panelFRM.document.all("info").value=info; top.update_panelFRM.document.all("info_value").value=document.all(info+"@"+info_id).innerHTML; top.update_panelFRM.update.submit(); } function update_image(info,info_id,filename) { hideMenu(); top.update_panelFRM.document.all("info_id").value=info_id; top.update_panelFRM.document.all("info").value=info; top.update_panelFRM.document.all("info_value").value=filename; top.update_panelFRM.update.submit(); } var ImageModeVar="Simple"; function edit_material(obj,filename){ window.showModelessDialog("http://www.iga-makeup.com//IC/MJeditor/PhotoShop/find_image.aspx?filename="+filename,window,"dialogHeight: 500px; dialogWidth: 500px; edge: Raised; center: No; help: Yes; resizable: Yes; status: No;"); } function get_from_image_bank(info,info_id) { hideMenu(); if(ImageModeVar=="ImageBank"){ ImageModeVar="Simple"; window.status="Ready"; top.parent.document.all("current_info_id").value=""; top.parent.document.all("current_image_field").value=""; top.parent.document.all("current_mode").value=""; top.firstFrame.GENERAL_frameset.cols = "100%, 0"; }else{ ImageModeVar="ImageBank"; window.status="Setting the " + info +" Image for Info_id: "+info_id ; top.parent.document.all("current_info_id").value=info_id; top.parent.document.all("current_image_field").value=info; top.parent.document.all("current_mode").value="image_bank"; var args; var x=window.showModalDialog("http://www.iga-makeup.com//IC/MJeditor/imageBank/imageBankDialog.aspx?mode=file_name",args,"dialogWidth: 500px; dialogHeight: 500px; center:yes; edge: Raised; center: Yes; help: No; resizable: No; status: No;"); if(x!=null&&x!=""){ update_image(info,info_id,x); document.location.href=document.location.href; } } } function update_free_field(field_id,info_id) { hideMenu(); top.update_panelFRM.document.all("info_id").value=info_id; top.update_panelFRM.document.all("field_id").value=field_id; top.update_panelFRM.document.all("field_value").value=document.all("field_value#"+info_id+"#"+field_id).innerHTML; top.update_panelFRM.document.all("number_value").value=document.all("number_value#"+info_id+"#"+field_id).innerHTML; top.update_panelFRM.update.submit(); } function delete_image(info,info_id){ hideMenu(); if (top.Confirm("CONFIRM_DELETE_IMAGE")){ top.update_panelFRM.document.all("info_id").value=info_id; top.update_panelFRM.document.all("info").value=info; top.update_panelFRM.document.all("info_value").value=""; top.update_panelFRM.update.submit(); document.location.reload(); } } function change_color(text,Mobj) { if (text == "FGcolor") { var theColor = window.showModalDialog( "http://www.iga-makeup.com//IC/mjeditor/selcolor.htm","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:30em" ); if(theColor!=null) document.ExecCommand("ForeColor",false,'red'); } else if (text == "BGcolor") { var theColor = window.showModalDialog( "http://www.iga-makeup.com//IC/mjeditor/selcolor.htm","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:30em" ); if(theColor!=null) document.ExecCommand("BackColor",false,theColor); } } function do_forecolor(){ var theColor = window.showModalDialog( "http://www.iga-makeup.com//IC/mjeditor/selcolor.htm","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:30em" ); document.execCommand('ForeColor', false,theColor) } function do_backcolor(){ var theColor = window.showModalDialog( "http://www.iga-makeup.com//IC/mjeditor/selcolor.htm","","font-family:Verdana; font-size:12; dialogWidth:30em; dialogHeight:30em" ); document.execCommand('BackColor', false,theColor) } function select_from_documents_for_field(field_name,info_id){ var i; arr =window.showModalDialog("http://www.iga-makeup.com//IC/infocenter/documents.asp?info_id="+info_id,"www","dialogHeight: 450px; dialogWidth: 600px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No;"); if(arr!=null){ document.all(field_name+"#"+info_id).innerHTML=arr; update_content(field_name,info_id); document.location.reload(); } } function execRE(re,rp,content) { oReg=new RegExp(re,"ig"); r = content.replace(oReg, rp); return r; } function codeSweeper(item_name) { var content,oTR; hideMenu(); obj=document.all(item_name); var aOut = null, aIn = new Array(); aOut = parent.showModalDialog("http://www.iga-makeup.com//IC/MJeditor/sweap/sweap_dialog.aspx",aIn,"dialogWidth:350px; dialogHeight:350px;help:0;status:no;"); if (aOut!=null){ if (aOut){ content = obj.innerHTML; } if (aOut["allhtml"]) { content = execRE("]*>", "", content); } if (aOut["word"]) { content = execRE("<\\?xml[^>]*>", "", content); content = execRE("<\/?[a-z]+:[^>]*>", "", content); content = execRE("(<[^>]+) class=[^ |^>]*([^>]*>)", "$1 $2", content); content = execRE("(<[^>]+) style=\"[^\"]*\"([^>]*>)", "$1 $2", content); content = execRE("]*><\/span[^>]*>", "", content); content = execRE("","", content); content = execRE("","", content); } if (aOut["css"]) { content = execRE("(<[^>]+) class=[^ |^>]*([^>]*>)", "$1 $2", content); content = execRE("(<[^>]+) style=\"[^\"]*\"([^>]*>)", "$1 $2", content); } if (aOut["font"]) { content = execRE("]*>", "", content); } if (aOut["span"]) { content = execRE("]*>","",content); } if (oTR != null) { obj.innerHTML=content.toString() } else { obj.innerHTML=content.toString() } } obj.focus(); } function hideMenu(){ document.all("RightMenuActive").style.display="none"; } function init(info_id,controlX){ var str=new String(); str=top.document.all("RightMenuTPL").innerHTML; str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); document.all("RightMenuActive").innerHTML=str; document.all("RightMenuActive").style.display="inline"; document.all("RightMenuActive").style.left=event.clientX+"PX"; document.all("RightMenuActive").style.top=Number(document.body.scrollTop+event.clientY)+"PX"; return false }; function initImage(info_id,controlX,filename){ var str=new String(); str=top.document.all("RightMenuImageTPL").innerHTML str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#filename",filename); str=str.replace("#filename",filename); document.all("RightMenuActive").innerHTML=str; document.all("RightMenuActive").style.display="inline"; document.all("RightMenuActive").style.left=event.clientX+"PX"; document.all("RightMenuActive").style.top=Number(document.body.scrollTop+event.clientY)+"PX"; return false }; function initFolder(info_id,info_type,controlX){ var str=new String(); str=top.document.all("RightMenuFolderTPL").innerHTML; str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_id",info_id); str=str.replace("#info_type",info_type); str=str.replace("#info_type",info_type); str=str.replace("#info_type",info_type); str=str.replace("#info_type",info_type); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); str=str.replace("#ControlName",controlX); document.all("RightMenuActive").innerHTML=str; document.all("RightMenuActive").style.display="inline"; document.all("RightMenuActive").style.left=event.clientX+"PX"; document.all("RightMenuActive").style.top=Number(document.body.scrollTop+event.clientY)+"PX"; return false }; function unlockControl(ControlName){ document.all(ControlName).style.border='1px #333333 solid'; document.all(ControlName).contentEditable=true; } function lockControl(ControlName){ if(document.all(ControlName).contentEditable=="false"){ document.all(ControlName).style.border='1px #333333 solid'; document.all(ControlName).contentEditable=true; }else{ document.all(ControlName).style.border='1px #333333 dashed'; document.all(ControlName).contentEditable=false; } }