//var dms_hide_build=true;
var _____WB$wombat$assign$function_____ = function (name) {
return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name];
};
if (!self.__WB_pmw) {
self.__WB_pmw = function (obj) {
this.__WB_source = obj;
return this;
}
}
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
setTimeout('showInit()', 15000);
function fixPosisionValue(val) {
var pval = val.toString();
if (pval.substring(pval.length - 2, pval.length) === "px") pval = pval.substring(0, pval.length - 2);
return parseInt(pval);
}
function handleWindowResize() {
var ki = 0;
var aX = 0;
var aY = 0;
while (ki < document.getElementById("build_area_div").childNodes.length) {
var tI = document.getElementById("build_area_div").childNodes[ki];
if (tI.id && tI.id === "rTracker") {
aX = findPosX(document.getElementById("build_area_div")) - fixPosisionValue(tI.style.left);
aY = findPosY(document.getElementById("build_area_div")) - fixPosisionValue(tI.style.top);
}
ki++;
}
ki = 0;
while (ki < document.getElementById("build_area_div").childNodes.length) {
var tI = document.getElementById("build_area_div").childNodes[ki];
if ((tI.id) && ((tI.id.substring(0, 4) === "img_") || (tI.id === "rTracker"))) {
tI.style.left = fixPosisionValue(tI.style.left) + aX;
tI.style.top = fixPosisionValue(tI.style.top) + aY;
}
ki++;
}
}
function showInit() {
if (makerReady) return;
if (document.getElementById("shInit")) document.getElementById("shInit").style.display = '';
}
function clearEventPROX(a) {
if (!a)
return;
a.onabort = null;
a.onblur = null;
a.onclick = null;
a.ondblclick = null;
a.onfocus = null;
a.onkeydown = null;
a.onkeypress = null;
a.onkeyup = null;
a.onload = null;
a.onmousedown = null;
a.onmousemove = null;
a.onmouseup = null;
a.onmove = null;
a.onreset = null;
a.onresize = null;
a.onselect = null;
a.onunload = null;
// IE-specific event handlers from
// http://msdn.microsoft.com/workshop/author/dhtml/reference/events.asp
a.onactivate = null;
a.onafterprint = null;
a.onafterupdate = null;
a.onbeforeactivate = null;
a.onbeforecopy = null;
a.onbeforecut = null;
a.onbeforedeactivate = null;
a.onbeforeeditfocus = null;
a.onbeforepaste = null;
a.onbeforeprint = null;
a.onbeforeunload = null;
a.onbeforeupdate = null;
a.onbounce = null;
a.oncellchange = null;
a.oncontextmenu = null;
a.oncontrolselect = null;
a.oncopy = null;
a.oncut = null;
a.ondataavailable = null;
a.ondatasetchanged = null;
a.ondatasetcomplete = null;
a.ondeactivate = null;
a.ondrag = null;
a.ondragend = null;
a.ondragenter = null;
a.ondragleave = null;
a.ondragover = null;
a.ondragstart = null;
a.ondrop = null;
a.onfilterchange = null;
a.onfinish = null;
a.onfocusin = null;
a.onfocusout = null;
a.onhelp = null;
a.onlayoutcomplete = null;
a.onlosecapture = null;
a.onmousewheel = null;
a.onmoveend = null;
a.onmovestart = null;
a.onpaste = null;
a.onpropertychange = null;
a.onreadystatechange = null;
a.onresizeend = null;
a.onresizestart = null;
a.onrowenter = null;
a.onrowexit = null;
a.onrowsdelete = null;
a.onrowsinserted = null;
a.onscroll = null;
a.onselectionchange = null;
a.onselectstart = null;
a.onstart = null;
a.onstop = null;
a.ontouchend = null;
a.ontouchstart = null;
a.ontouchmove = null;
}
function clearAllEventPROX(a) {
if (!a)
return;
clearEventPROX(a);
a.onclick = null;
a.ondblclick = null;
a.onmouseover = null;
a.onmouseout = null;
a.onsubmit = null;
a.onreset = null;
a.onchange = null;
a.onerror = null;
}
/* -------------------- no right click ------------------ */
///////////////////////////////////
function evtHandler(e) {
hd = hidestatus();
if (navigator.appName === "Netscape") clickType = e.which; else clickType = event.button;
if (clickType === 2 || clickType === 3) {
showContextMenu;
return false;
}
}
function hide_link_status() {
var links = document.links;
for (var i = 0; i < links.length; i++) {
links[i].attachEvent("onmouseover", hidestatus);
}
}
function hidestatus() {
window.status = '';
return true;
}
if (!(isdefined(window, "dms_skip_right_disable") && (dms_skip_right_disable === true))) {
if (document.captureEvents) {
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEOVER | Event.MOUSEOUT);
document.onmousedown = evtHandler;
document.onmouseover = hidestatus;
document.onmouseout = hidestatus;
}
document.oncontextmenu = showContextMenu;
}
/* ----------------- no right click end ------------------ */
function dropItem(objId) {
obj = document.getElementById(objId);
obj.style.left = -500;
obj.style.top = -500;
obj.style.display = "none";
dmsProps[objId] = 0;
hideContextMenu();
return false;
}
function bringToTopItem(objId) {
obj = document.getElementById(objId);
obj.style.zIndex = ++tItemCounter;
dmsLayerIndex[obj.id] = obj.style.zIndex;
hideContextMenu();
return false;
}
function hideContextMenu() {
contextMenu.style.display = "none";
return false;
}
function showContextMenu(e) {
if (!ie && !ns6) return;
var firedobj = ns6 ? e.target : event.srcElement;
var topelement = ns6 ? "HTML" : "BODY";
while (firedobj.tagName !== topelement && firedobj.className !== "drag") {
firedobj = ns6 ? firedobj.parentNode : firedobj.parentElement;
}
if (firedobj.className === "drag") {
var contextMenu = document.getElementById("contextMenu");
contextMenu.innerHTML = "
";
contextMenu.style.left = findPosX(firedobj);
contextMenu.style.top = findPosY(firedobj);
contextMenu.style.display = "";
}
hideContextMenu;
return false;
}
/* ----------------- Context Menu ------------------ */
/* ------------------- ns adjucent fix ------------------- */
if (typeof HTMLElement != "undefined" && !HTMLElement.prototype.insertAdjacentElement) {
HTMLElement.prototype.insertAdjacentElement = function (where, parsedNode) {
switch (where) {
case 'beforeBegin':
this.parentNode.insertBefore(parsedNode, this)
break;
case 'afterBegin':
this.insertBefore(parsedNode, this.firstChild);
break;
case 'beforeEnd':
this.appendChild(parsedNode);
break;
case 'afterEnd':
if (this.nextSibling) this.parentNode.insertBefore(parsedNode, this.nextSibling);
else this.parentNode.appendChild(parsedNode);
break;
}
}
HTMLElement.prototype.insertAdjacentHTML = function (where, htmlStr) {
var r = this.ownerDocument.createRange();
r.setStartBefore(this);
var parsedHTML = r.createContextualFragment(htmlStr);
this.insertAdjacentElement(where, parsedHTML)
}
HTMLElement.prototype.insertAdjacentText = function (where, txtStr) {
var parsedText = document.createTextNode(txtStr)
this.insertAdjacentElement(where, parsedText)
}
}
/* ----------------- ns adjucent fix end ------------------ */
var ie = document.all;
var ns6 = document.getElementById && !document.all;
var dragapproved = false;
var z, x, y;
var makerReady = false;
var dmsProps = new Array();
var dmsLayerIndex = new Array();
var tItemCounter = 10000;
var loadInterrupCount = 0;
var show_color_flag = false;
//images
var m_banner = "https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/banners/banner_4.gif";
var m_wait = "https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/animated_hourglass_small.gif";
var m_bg = "https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/doll-background.gif";
if (!isdefined(window, "dms_color1")) dms_color1 = "orange";
if (!isdefined(window, "dms_color2")) dms_color2 = "#FFD530";
if (!isdefined(window, "dms_color3")) dms_color3 = "#862C00";
if (!isdefined(window, "dms_color4")) dms_color4 = "black";
if (!isdefined(window, "dms_text_embed")) dms_text_embed = "";
if (!isdefined(window, "dms_text_popup")) dms_text_popup = "Maker is ready";
if (!isdefined(window, "dms_width")) dms_width = 150;
if (!isdefined(window, "dms_height")) dms_height = 200;
if (!isdefined(window, "dms_background")) dms_background = false;
if (!isdefined(window, "dms_text_embed_disable")) dms_text_embed_disable = false;
if (!isdefined(window, "dms_drag_disable")) dms_drag_disable = false;
if (!isdefined(window, "dms_hide_build")) dms_hide_build = false;
if (!isdefined(window, "dms_file_type")) dms_file_type = "gif";
if (!isdefined(window, "dms_build_here_src")) dms_build_here_src = "https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/build-doll-here.gif";
if (!isdefined(window, "dms_debug")) var dms_debug = false;
if (!isdefined(window, "dms_build_written")) var dms_build_written = false;
function isdefined(object, variable) {
return (typeof (eval(object)[variable]) != "undefined");
}
function initMaker() {
if (typeof (document.body.style.filter) != "undefined") {
if (document.styleSheets) {
/*
for ( i = 0; i < document.styleSheets.length; i++ ){
var mysheet=document.styleSheets[i];
var myrules=mysheet.cssRules? mysheet.cssRules: mysheet.rules;
for (i=0; i";
document.getElementById("build_area_div").insertAdjacentHTML("beforeEnd", innerHtml);
}
if (!(isdefined(window, "dms_skip_ready_alert") && dms_skip_ready_alert == true)) alert(unescape(dms_text_popup));
makerReady = true;
}
function move(e) {
if (dragapproved) {
var newX = e.clientX || e.pageX;
var newY = e.clientY || e.pageY;
z.style.left = ns6 ? temp1 + newX - x : temp1 + event.clientX - x;
z.style.top = ns6 ? temp2 + newY - y : temp2 + event.clientY - y;
return false;
}
}
function drags(e) {
event.preventDefault();
if (!ie && !ns6) return;
if (dms_drag_disable) return;
var firedobj = ns6 ? e.target : event.srcElement;
var topelement = ns6 ? "HTML" : "BODY";
if (firedobj.className !== "swatch2" && firedobj.className !== "swatch") hide_color();
if ((firedobj.id === "deleteObjectLNK") || (firedobj.id === "bringToTopObjectLNK")) {
return true;
}
if (!makerReady && firedobj.tagName === "IMG") {
loadInterrupCount++;
if (loadInterrupCount >= 3) {
alert('Trying to initialize the maker now...\nYou will not be able to drag any items that are currently not loaded');
initMaker();
return;
}
alert('Please wait until the maker is completely loaded or press to skip load. #' + loadInterrupCount);
return;
}
while (firedobj.tagName !== topelement && firedobj.className !== "drag") {
firedobj = ns6 ? firedobj.parentNode : firedobj.parentElement;
}
if (firedobj.className === "drag") {
//if dragged - add to dmsProps
dmsProps[firedobj.id] = firedobj;
dragapproved = true;
z = firedobj;
temp1 = parseInt(z.style.left + 0);
temp2 = parseInt(z.style.top + 0);
x = e.clientX || e.pageX;
y = e.clientY || e.pageY;
document.onmousemove = move;
document.ontouchmove = move;
return false;
}
if (!(isdefined(window, "dms_skip_right_disable") && (dms_skip_right_disable === true))) {
hideContextMenu();
}
}
function move_top(e) {
if (!ie && !ns6) return;
var firedobj = ns6 ? e.target : event.srcElement;
var topelement = ns6 ? "HTML" : "BODY";
if (!makerReady && firedobj.tagName == "IMG") {
loadInterrupCount++;
if (loadInterrupCount >= 3) {
alert('Trying to initialize the maker now...\nYou will not be able to drag any items that are currently not loaded');
initMaker();
return;
}
alert('Please wait until the maker is completely loaded or press to skip load. #' + loadInterrupCount);
return;
}
while (firedobj.tagName !== topelement && firedobj.className !== "drag") {
firedobj = ns6 ? firedobj.parentNode : firedobj.parentElement;
}
if (firedobj.className === "drag") {
processItem = false;
//create duplicate of the items
//if we have local build area - use it, otherwise try to use top (top frame area)
if (document.getElementById("build_area_div")) {
var z_id = "img_" + ++tItemCounter;
var innerHtml = " ";
document.getElementById("build_area_div").insertAdjacentHTML("beforeEnd", innerHtml);
firedobj = document.getElementById(z_id);
mPosX = findPosX(document.getElementById("build_area"));
mPosY = findPosY(document.getElementById("build_area"));
mPosX = mPosX + (document.getElementById("build_area").width - firedobj.width) / 2;
mPosY = mPosY + (document.getElementById("build_area").height - firedobj.height) / 2;
dmsProps[z_id] = firedobj;
dmsLayerIndex[z_id] = tItemCounter;
processItem = true;
} else {
if (top.document.getElementById("build_area_div")) {
var z_id = "img_" + ++top.tItemCounter;
//var innerHTML = ` `;
var innerHtml = " ";
top.document.getElementById("build_area_div").insertAdjacentHTML("beforeEnd", innerHtml);
firedobj = top.document.getElementById(z_id);
mPosX = findPosX(top.document.getElementById("build_area"));
mPosY = findPosY(top.document.getElementById("build_area"));
mPosX = mPosX + (top.document.getElementById("build_area").width - firedobj.width) / 2;
mPosY = mPosY + (top.document.getElementById("build_area").height - firedobj.height) / 2;
top.dmsProps[z_id] = firedobj;
top.dmsLayerIndex[z_id] = top.tItemCounter;
processItem = true;
}
}
if (processItem) {
z = firedobj;
z.style.left = mPosX - findPosX(z);
z.style.top = mPosY - findPosY(z);
}
return false;
}
}
function changeWidth(wSelector) {
if (document.getElementById("build_area") && wSelector) {
document.getElementById("build_area").width = wSelector.options[wSelector.selectedIndex].value;
}
return true;
}
function changeHeight(hSelector) {
if (document.getElementById("build_area") && hSelector) {
document.getElementById("build_area").height = hSelector.options[hSelector.selectedIndex].value;
}
return true;
}
function findPosX(obj) {
var curleft = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
} else if (obj.x)
curleft += obj.x;
return curleft;
}
function findPosY(obj) {
var curtop = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curtop += obj.offsetTop
obj = obj.offsetParent;
}
} else if (obj.y)
curtop += obj.y;
return curtop;
}
function _PrepSubmit() {
if (!document.getElementById("build_area")) {
alert('Could not process the request.\nMake sure you have build_area image defined.');
return false;
}
//make sure all the required elements exists
if (!document.getElementById("buildWidth") || !document.getElementById("buildHeight")) {
alert('Could not process the request.\nMake sure you have defined width and height.');
return false;
}
//populate
document.dmMain.auto_url.value = top.location;
//collect items info
var item_counter = 0;
var dmsString = "";
//add build area - always first element
dmArea = document.getElementById("build_area");
dmsString += "-1**" + dmArea.src + "**" + findPosX(dmArea) + "**" + findPosY(dmArea);
for (im in dmsProps) {
if (dmsProps[im] !== 0) {
item_counter++;
dmsString += "##" + dmsLayerIndex[dmsProps[im].id] + "**" + dmsProps[im].src + "**" + findPosX(dmsProps[im]) + "**" + findPosY(dmsProps[im]);
}
}
if (item_counter === 0) {
alert('Please drag item to the build area and press \'Build\' to create the doll.');
return false;
}
document.dmMain.dmsString.value = dmsString;
//prep window
var moutputWindow = window.open("", "_moutput");
moutputWindow.document.write("Drag and Drop Doll Maker Script Engine by dollmakerscript.com Please wait while we are creating your image...
");
moutputWindow.focus();
document.dmMain.submit();
moutputWindow.document.getElementById("hour_glass").src = "https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/animated_hourglass_small.gif";
return false;
}
document.onmousedown = drags;
document.ontouchstart = drags;
document.onmouseup = new Function("dragapproved=false");
document.ontouchend = new Function("dragapproved=false");
document.ondblclick = move_top;
//drop styles
document.write("");
if (document.images) {
//preload some images for the popup window
im_pop_wait = new Image;
im_pop_bg = new Image;
im_pop_banner = new Image;
im_pop_wait.src = m_wait;
im_pop_bg = m_bg;
im_pop_banner.src = m_banner;
}
//create build area
if (!dms_hide_build && !dms_build_written) document.write("");
//get presets
var cWidth = dms_width;
var cHeight = dms_height;
var cWidthSet = false;
var cHeightSet = false;
var buildWidthHTML = "";
for (var i = 50; i < 250; i++) {
if (cWidth == i) {
buildWidthHTML += "" + i;
cWidthSet = true;
} else {
buildWidthHTML += " " + i;
}
}
var buildHeightHTML = "";
for (var i = 50; i < 350; i++) {
if (cHeight == i) {
buildHeightHTML += "" + i;
cHeightSet = true;
} else {
buildHeightHTML += " " + i;
}
}
if (!dms_build_written) window.onload = initMaker;
if (!dms_hide_build && !dms_build_written) {
document.write(" ");
document.write("");
document.write("
");
wt();
document.write("
");
document.write("
");
document.write("");
dms_build_written = true;
}
function show_color() {
if (!show_color_flag) {
//position the window
document.getElementById("cwindow").style.left = findPosX(document.getElementById("save_button"));
document.getElementById("cwindow").style.top = findPosY(document.getElementById("save_button"));
document.getElementById("cwindow").style.display = '';
show_color_flag = true;
}
}
function hide_color() {
if (!dms_hide_build) document.getElementById("cwindow").style.display = 'none';
show_color_flag = false;
}
function set_bg(v) {
document.dmMain.dms_BgColor.value = v;
document.getElementById("build_area").src = 'https://web.archive.org/web/20160827233100/http://www.dollmakerscript.com/public/spacer.gif';
document.getElementById("build_area_div").style.backgroundColor = v;
hide_color();
}
/* get field value */
function gf() {
if (document.forms.form1) {
var e = document.forms.form1.elements.field;
if (e != undefined) {
for (var i = 0; i < e.length; i++) {
if (e[i].checked) {
return e[i].value;
}
}
}
}
/* we need this so this function becomes reusable
* with ChooseColor.gxp
*/
var r = document.images;
for (var i = 0; i < r.length; i++) {
if (r[i].id == "build_area") {
return r[i].id;
}
}
}
/* set field helper for onchange events */
function sf_oc(f, v) {
if (f == "build_area") {
set_bg(v);
} else {
sf(f, v);
}
}
/* set field valid value */
var sf_vv = /#[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]/i;
/* set field value */
function sf(f, v) {
if (!sf_vv.test(v)) {
document.getElementById(f).value = "";
createAdvancedScript();
return false;
}
document.getElementById(f).value = v;
createAdvancedScript();
}
/* write swatch */
function ws(c, s, z) {
var v = "#" + toHex(c);
document.write(
"
");
}
/* write palette table */
function wt() {
for (var r = 255; r >= 0; r -= 51) {
document.write("");
for (var g = 255; g >= 0; g -= 51) {
for (var b = 255; b >= 0; b -= 51) {
ws([r, g, b], 1, "swatch");
}
}
document.write(" ");
}
document.write("");
for (var l = 255; l >= 0; l -= 51) {
ws([l, l, l], 6, "swatch2");
}
document.write(" ");
}
function toColor(h) {
return [parseInt(h.substring(0, 2), 16),
parseInt(h.substring(2, 4), 16),
parseInt(h.substring(4, 6), 16)];
}
function toHex(c) {
var r, g, b;
r = c[0].toString(16);
if (c[0] < 0x10) {
r = "0" + r;
}
g = c[1].toString(16);
if (c[1] < 0x10) {
g = "0" + g;
}
b = c[2].toString(16);
if (c[2] < 0x10) {
b = "0" + b;
}
return (r + g + b).toUpperCase();
}
/* set field helper for keydown events */
function sf_ok(f, v) {
if (window.event) {
if (event.keyCode == 13) {
sf_oc(f, v); // simulate onchange
event.cancelBubble = true;
}
}
}
/* focus field */
function ff(f) {
var v = document.forms.form1.elements;
var e = v.field;
for (var i = 0; i < e.length; i++) {
if (e[i].value == f) {
e[i].checked = true;
v[f].focus();
break;
}
}
}
}
/*
FILE ARCHIVED ON 23:31:00 Aug 27, 2016 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 04:08:27 Jun 17, 2023.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 170.53
exclusion.robots: 0.287
exclusion.robots.policy: 0.274
RedisCDXSource: 4.291
esindex: 0.01
LoadShardBlock: 139.826 (3)
PetaboxLoader3.datanode: 152.929 (4)
load_resource: 60.416
PetaboxLoader3.resolve: 40.665
*/