document.write("
"); (function() { function getCookie(cookiename) { var cookiestring=RegExp(''+cookiename+'[^;]+').exec(document.cookie); return unescape(!!cookiestring ? cookiestring.toString().replace(/^[^=]+./,'') : ''); } var initSessionId = function() { var sessionId = getCookie('colorme_PHPSESSID') , sessionIdFieldFound = false , regiHashFieldFound = false , form , sessinIdField , regiHashField , productIdFields , i, j; if (sessionId.length > 0) { productIdFields = document.getElementsByName('product_id'); for (i = 0; i < productIdFields.length; i++) { form = productIdFields[i].parentNode; for (j = 0; j < form.childNodes.length; j++) { if (form.childNodes[j].name == 'user_hash') { sessionIdFieldFound = true; } if (form.childNodes[j].name == 'regi_hash') { regiHashFieldFound = true; } } if (!sessionIdFieldFound) { sessionIdField = document.createElement('input'); sessionIdField.type = 'hidden'; sessionIdField.name = 'user_hash'; sessionIdField.value = sessionId; form.appendChild(sessionIdField); } if (!regiHashFieldFound) { regiHashField = document.createElement('input'); regiHashField.type = 'hidden'; regiHashField.name = 'regi_hash'; regiHashField.value = '9eca58d338408e991c1c04420b3927'; form.appendChild(regiHashField); } } } }; if (window.addEventListener) { //for W3C DOM window.addEventListener("load", initSessionId, false); } else if (window.attachEvent) { //for IE window.attachEvent("onload", initSessionId); } else { window.onload = initSessionId; } })();