if (typeof cls_InovaDiamonds_Iframe === 'undefined' || cls_InovaDiamonds_Iframe === 'lo') {
class InovaDiamonds_Iframe {
// 819
Get_Info_Product(Query_From, mode) {
cls_InovaDiamonds_Iframe.check_Browser();
function To_Form(val) {
return (val.replace(/ /g, '').replace(/-/g, '').replace(/\./g, '').replace(/-/g, '').toLowerCase()).replace(/\n/g, '')
}
function isDecimal(str) {
if (typeof str !== "string") return false;
const num = parseFloat(str);
return !isNaN(num) && isFinite(num) && str.trim() !== "";
}
function Carat_To_Form(val) {
val = val.toLowerCase().replace('ct.', '').replace('ct', '')
val =val.replace(/ /g, '').replace(/-/g, '').replace(/,/g, '.').replace(/-/g, '').toLowerCase().replace(/\n/g, '')
if (isDecimal(val)){
if (val.indexOf('.') == 0) {
val = '0' + val_Post
}
var ar = val.split('.')
if (ar.length == 2) {
if (ar[1].length == 1) {
return (val + '0')
}
return (ar[0] + '.' + ar[1].substring(0, 2))
}
else if (ar.length == 1) {
return (ar[0] + '.00')
}
}
if (document.location.href.indexOf('localhost') > 0) {
alert('Carat_To_Form - val: ' + val);
}
return('')
}
function Color_To_Form(val) {
val = val.toLowerCase().trim().replace(/ /g, ' ').replace(/ /g, ' ');
if (!val || val == '') {
return "";
}
let key = null;
if (val.indexOf("yellow") >= 0) {
key = "y";
} else if (val.indexOf("rose") >= 0) {
key = "r";
} else if (val.indexOf("white") >= 0) {
key = "w";
} else if (val.indexOf("platin") >= 0) {
key = "p";
} else {
if (val.indexOf("y")) {
key = "y";
} else if (val.indexOf("r") >= 0) {
key = "r";
} else if (val.indexOf("w") >= 0) {
key = "w";
} else if (val.indexOf("p") >= 0) {
key = "p";
}
}
if (!key) {
return "";
}
let karat = null;
if (val.indexOf("9k") >= 0) {
karat = "-9";
} else if (val.indexOf("14k") >= 0) {
karat = "-14";
} else if (val.indexOf("18k") >= 0) {
karat = "-18";
} else if (val.indexOf("21k") >= 0) {
karat = "-21";
} else {
if (val.indexOf("9") >= 0) {
karat = "-9";
} else if (val.indexOf("14") >= 0) {
karat = "-14";
} else if (val.indexOf("18") >= 0) {
karat = "-18";
} else if (val.indexOf("21") >= 0) {
karat = "-21";
}
}
if (karat) {
return key + karat;
}
return key;
}
function Work_Shapes_Relation(Ret, ar_Site) {
st_Shape = '';
st_Shapes = '';
Ret = To_Form(Ret);
var ar_Mod = cls_InovaDiamonds_Iframe.Shape_Relation.split(',')
for (var sh = 0; sh < ar_Site.length; sh++) {
var st_Site = To_Form(ar_Site[sh]);
for (var j = 0; j < ar_Mod.length; j++) {
var ar_2 = ar_Mod[j].split('=');
if (ar_2.length == 2) {
var st_Mod = To_Form(ar_2[1]);
if (st_Mod == st_Site) {
if (st_Mod == Ret) {
st_Shape = ar_2[0];
}
if (st_Shapes != '') {
st_Shapes += ','
}
st_Shapes += ar_2[0];
break;
}
}
}
}
if (st_Shape == '') {
st_Shape = cls_InovaDiamonds_Iframe.Default_3D_Shape
}
if (st_Shapes == '') {
st_Shapes = st_Shape
}
}
function Work_Textures_Relation(Cur_Texture, ar_Site) {
st_Texture = '';
st_Textures = '';
st_Text_Color = ',';
Cur_Texture = To_Form(Cur_Texture);
if (cls_InovaDiamonds_Iframe.Texture_Relation == '') {
st_Texture = cls_InovaDiamonds_Iframe.Default_3D_Texture.toLowerCase();
st_Textures = st_Texture
}
var ar_Mod = cls_InovaDiamonds_Iframe.Texture_Relation.split('#')[0].split(',')
for (var i = 0; i < ar_Site.length; i++) {
var st_Site = To_Form(ar_Site[i])
if (st_Site != '') {
for (var j = 0; j < ar_Mod.length; j++) {
var ar_3 = ar_Mod[j].split('=');
if (ar_3.length == 3) {
var st_Mod = To_Form(ar_3[2]);
if (st_Site == st_Mod) {
if (st_Mod == Cur_Texture) {
st_Texture = ar_3[0];
st_Text_Color = ar_3[1];
}
if (st_Textures != '') {
st_Textures += ','
}
st_Textures += ar_3[0]
ar_3[1] = To_Form(ar_3[1])
if (st_Text_Colors.indexOf(',' + ar_3[1] + ',') < 0) {
st_Text_Colors += ar_3[1] + ','
}
}
}
}
}
}
if (st_Texture == '') {
st_Texture = cls_InovaDiamonds_Iframe.Default_3D_Texture.toLowerCase();
}
if (st_Textures == '') {
st_Textures = st_Texture
}
}
var st_SKU = '';
var st_Colors = '';
var st_Color = '';
var st_Carats = '';
var st_Carat = '';
var st_Textures = '';
var st_Texture = '';
var st_Text_Colors = '';
var st_Text_Color = '';
var st_Shapes = '';
var st_Shape = '';
if (this.This_IP == '149.106.241.237') {
debugger
}
//
//
var ct = document.getElementsByClassName('catproducts')
if (ct.length > 0) {
cls_InovaDiamonds_Iframe.User_Ring = '';
cls_InovaDiamonds_Iframe.Mode = 'list';
for (var i = 0; i < ct.length; i++) {
if (ct[i].getAttribute('ino_supp')){
}
else{
var aa = ct[i].getElementsByTagName('DIV')
for (var j = 0; j < aa.length; j++) {
if (aa[j].getAttribute('data-sku')){
cls_InovaDiamonds_Iframe.User_Ring += ',' + aa[j].getAttribute('data-sku');
}
}
}
}
return ('')
}
function Work_Shapes() {
var Ret = '';
var ar = document.getElementById('rtr_shapes').getElementsByTagName('LI')
var ar_Shapes = ('').split(',');
for (var i = 0; i < ar.length; i++) {
var sh = ar[i].getElementsByTagName('SPAN')[0].textContent;
if (ar[i].getElementsByTagName('A')[0].classList.contains('active')) {
Ret = sh;
}
ar_Shapes[i] = sh
}
Work_Shapes_Relation(Ret, ar_Shapes)
}
function Work_Metal() {
var ar = document.getElementById('rtr_color').getElementsByTagName('LI')
for (var i = 0; i < ar.length; i++) {
var cla = ar[i].getElementsByTagName('SPAN')[0].className;
var cl = '';
if (cla.indexOf('rose') >= 0) { cl = 'r' }
else if (cla.indexOf('yellow') >= 0) { cl = 'y' }
else { cl = 'w' }
if (st_Colors.indexOf(cl) < 0) {
if (st_Colors != '') {
st_Colors += ','
}
st_Colors += cl
}
if (cla.indexOf('selectedMetal') >= 0) {
st_Color += cl
}
}
}
function Work_Textures() {
var Ret = ''
var ar = document.getElementById('rtr_tex').getElementsByTagName('LI')
var ar_Textures = ('').split(',');
for (var i = 0; i < ar.length; i++) {
var txt = ar[i].getElementsByTagName('SPAN')[0].textContent;
ar_Textures[i] = txt;
if (ar[i].getElementsByTagName('A')[0].className.indexOf('active') >= 0) {
Ret = txt
}
}
Work_Textures_Relation(Ret, ar_Textures)
}
function Work_Carat() {
//rtr_carat
if (cls_InovaDiamonds_Iframe.Type_Product == '40') {
var o = document.getElementById('rtr_carat');
if (!o) {
return ('')
}
var ar = o.getElementsByTagName('LI')
for (var i = 0; i < ar.length; i++) {
var val = ((ar[i].textContent * 1) / 2)
val = parseFloat(val.toFixed(2)) + '';
if (st_Carats != '') {
st_Carats += ','
}
st_Carats += val;
if (ar[i].getElementsByTagName('A')[0].classList.contains('active')) {
st_Carat = val
}
}
if (st_Carat == '0.05' && cls_InovaDiamonds_Iframe.Default_Carat_02 == '') {
st_Carat = '0.50'
}
else {
if (st_Carat != '0.05') {
cls_InovaDiamonds_Iframe.Default_Carat_02 = '1';
}
}
}
else {
var o = document.getElementById('rtr_carat');
if (! o){
return ('')
}
st_Carat = o.textContent;
st_Carat = Carat_To_Form(st_Carat)
if (st_Carat == '0.20' && cls_InovaDiamonds_Iframe.Default_Carat_02 == '') {
st_Carat = '1.00'
}
else {
if (st_Carat != '0.20') {
cls_InovaDiamonds_Iframe.Default_Carat_02 = '1';
}
}
st_Carats = '0.30,0.40,0.50,0.75,1.00,1.25,1.50,1.75,2.00,2.50,3.00,3.50'
}
}
st_SKU = document.getElementsByClassName('productSKU')[0].innerHTML
if (st_SKU == '') {
throw new Error("Data is required!")
}
var cnt = document.getElementById('rtr_try_on')
if (cnt) {
cnt = document.getElementById('rtr_try_on_mobile')
if (!cnt) {
throw new Error("Data is required!")
}
}
else {
throw new Error("Data is required!")
}
//https://test.abelini.com/product/solitaire-engagement-rings-platinum-rose-white-gold-brilliant-cut-diamond-rine3170?Dev_wRk=57537
debugger
Work_Shapes()
Work_Metal()
Work_Textures()
Work_Carat()
if (cls_InovaDiamonds_Iframe.Shape_Relation != '') {
if (st_Color != '' || st_Carat != '') {
if (st_Shape == '' || st_Texture == '') {
cls_InovaDiamonds_Iframe.User_Ring = 'ABBA'
return ('')
}
}
}
if (st_SKU == 'RINH2015B-RND' ||
st_SKU == 'RINE2427-RND' ||
st_SKU == 'RINE2863-RND' ||
st_SKU == 'RINE3061-RND' ||
st_SKU == 'RINE3128-RND' ||
st_SKU == 'RINE3149-RND' ||
st_SKU == 'RINE3170-RND' ||
st_SKU == 'RINE3584-RND' ||
st_SKU == 'RINE4820-RND' ||
st_SKU == 'RINE5737-RND') { }
else {
var ar = st_SKU.split('-');
if (ar.length == 3) {
st_SKU = ar[0] + '-' + ar[2];
}
}
cls_InovaDiamonds_Iframe.User_Ring = st_SKU.replace(/-/g, '_').replace(/\//g, '_').replace(/\./g, '_').replace(/ /g, '')
+ '^colors:' + st_Colors
+ '^color:' + st_Color
+ '^carat:' + st_Carat
+ '^carats:' + st_Carats
+ '^texture:' + st_Texture
+ '^textures:' + st_Textures
+ '^text_colors:' + st_Text_Colors
+ '^shape:' + st_Shape
+ '^shapes:' + st_Shapes;
if (Query_From == 'Print_Button') {
return (User_Ring)
}
if (Query_From == 'event') {
return (st_Shape + '^' + st_Text_Color + '^' + st_Color + '^' + st_Carat)
}
return ('')
}
Default_For_Design() {
var Def_Value = '4069';
//
return (Def_Value)
}
Print_Buttons(data, type_prod, rng_3DM){
var _View = '';
//
_View = 'none'
var o;
//var im = document.createElement('IMG')
//im.src = '/catalog/view/theme/default/img/try_on.jpeg';
//im.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.Inova__OpenFrame()')
//im.setAttribute('style', 'width:90px;position:absolute;left:0px;bottom:0px;z-index:555;cursor:pointer')
//document.getElementById('image_div').appendChild(im)
var icon = '';
var o_Div = document.createElement('DIV');
o_Div.id = 'Inova_Try_A';
//o_Div.style.display = 'none'
o_Div.innerHTML = '
'
+ '' + icon.replace('[~clr~]', 'CH') + ' | '
+ ' Try On |
'
if ((type_prod * 1) < 25){
var p = document.getElementById('image_div')
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == '1') {
o_Div.setAttribute('style', 'position:absolute;z-index:55555;top:-44px;float:left;background-color:black;border-radius:17px;width:110px;margin-left:22px')
p = document.getElementById('image-section-tab')
p.parentNode.insertBefore(o_Div, p)
}
else {
o_Div.setAttribute('style', 'background-color:black;border-radius:17px;width:90px;position:absolute;left:0px;bottom:0px;z-index:555;cursor:pointer')
p.appendChild(o_Div)
}
}
cls_InovaDiamonds_Iframe.Default_Carat_02 = '';
if (rng_3DM == '1') {
setTimeout(function () {
cls_InovaDiamonds_Iframe.Print_Button_Go();
}, 200);
}
else {
o_Div.style.display = 'block'
}
return (_View)
}
Print_Button_iFrame_Put(isMobile){
function Del_Child() {
for (var i = 0; i < ar.length; i++) {
if (ar[i].tagName != 'IFRAME') {
cls_InovaDiamonds_Iframe.container_3D.removeChild(ar[i])
return (true)
}
}
return (false)
}
cls_InovaDiamonds_Iframe.Count_Check_iFrame += 1
if (cls_InovaDiamonds_Iframe.Count_Check_iFrame > 50 || cls_InovaDiamonds_Iframe.flag_load_3D == true) {
var ar = cls_InovaDiamonds_Iframe.container_3D.childNodes
for (var i = 0; i < ar.length; i++) {
if (ar[i].tagName) {
if (ar[i].tagName != 'IFRAME') {
ar[i].setAttribute('style', '-webkit-transition:2s;-o-transition:2s;transition:2s;opacity:0')
}
}
}
setTimeout(function () {
for (var i = 0; i < 100; i++) {
if (! Del_Child()) {
break;
}
}
}, 2000);
return ('')
}
setTimeout(function () {
cls_InovaDiamonds_Iframe.Print_Button_iFrame_Put(isMobile);
}, 100);
}
Print_Button_Go(){
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
if (isMobile) {
cls_InovaDiamonds_Iframe.container_3D = document.getElementById('rtr_try_on_mobile');
if (cls_InovaDiamonds_Iframe.container_3D) {
cls_InovaDiamonds_Iframe.container_3D.style.minHeight = '100px'
cls_InovaDiamonds_Iframe.container_3D.style.height = 'auto'
}
}
else {
cls_InovaDiamonds_Iframe.container_3D = document.getElementById('rtr_try_on');
}
if (cls_InovaDiamonds_Iframe.container_3D) {
if (cls_InovaDiamonds_Iframe.container_3D.style.display == 'none') { }
else {
var ch = cls_InovaDiamonds_Iframe.container_3D.childNodes
if (ch.length == 0 || cls_InovaDiamonds_Iframe.container_3D.childNodes[0].tagName != 'IFRAME') {
var IFRAME = document.createElement('IFRAME');
IFRAME.setAttribute('style', 'border:0px solid white;z-index:-1');
IFRAME.id = 'id_vto_show';
cls_InovaDiamonds_Iframe.container_3D.appendChild(IFRAME)
if (isMobile) {
IFRAME.style.width = window.screen.width + 'px';
IFRAME.style.height = window.screen.width + 'px';
}
else {
IFRAME.style.width = '100%';
IFRAME.style.height = '100%';
}
cls_InovaDiamonds_Iframe.Inova__OpenFrame("Mod_3D:2^iFrm_Targ:id_vto_show^Btn_Close:1^Left_Panel_No:no");
document.getElementById('Inova_Try_A').style.display = 'block';
setTimeout(function () {
cls_InovaDiamonds_Iframe.Print_Button_iFrame_Put(isMobile);
}, 500);
cls_InovaDiamonds_Iframe.Count_Check_iFrame = 0
try{document.getElementById('slider').parentNode.setAttribute('onmouseup', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("carat")},100)')}catch(_e){}
try{document.getElementById('slider').parentNode.setAttribute('onclick', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("carat")},100)')}catch(_e){}
try { document.getElementById('div_carat').parentNode.setAttribute('onclick', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("color")},100)') } catch (_e) { }
try { document.getElementById('rtr_color').parentNode.setAttribute('onclick', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("color")},100)') } catch (_e) { }
try{document.getElementById('rtr_shapes').parentNode.setAttribute('onclick', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("shape")},100)')}catch(_e){}
try{document.getElementById('rtr_tex').parentNode.setAttribute('onclick', 'setTimeout(function(){cls_InovaDiamonds_Iframe.Go_User_Event("text_stone")},100)')}catch(_e){}
return ('')
}
}
}
setTimeout(function () {
cls_InovaDiamonds_Iframe.Print_Button_Go();
}, 200);
var _View = '';
return (_View);
}
Before_Open_iFrame() {
//
}
After_Close_iFrame() {
//
}
Init_User_Code() {
//
}
Get_Product_Images() {
//
}
Go_User_Event(Param, obj) {
// Param = Param.replace(/ /g, '')
//
var Ar_Val = cls_InovaDiamonds_Iframe.Get_Info_Product('event').split('^')
cls_InovaDiamonds_Iframe.Prepare_Post_Message(Ar_Val,'^' + Param + '^')
}
//Get_info_From_Page(URL) {
Get_info_From_Page(URL) { }
//}
constructor() {
this.WA___Flag_Mobile = '0';
this.WA___Flag_iPhone = false;
this.WA___iPhone_Stat = false;
this.WA___Flag_Load = 0;
this.WA___Frame_SRC = 0;
this.WA___Flag_Open = 0;
this.WA___TagVieport = '';
this.WA___TagText = '';
this.WA___ViewPort_K = 1;
this.Parent_Body_Style = '';
this.Parent_HTML_Style = '';
this.Flag_Block_Rotate = '';
this.Type_Product = '';
this.Window_Height = 0;
this.Interval = '';
this.User_Parent = '';
this.Flag_Page_Success = '';
this.User_Ring = '';
this.User_Ring_Checked = '';
this.User_Diam = '';
this.Count_Time = 0;
this.Old_Product_Name = '';
this.z_Back = '2147483644';
this.z_iFrame = '2147483645';
this.z_Mess = '2147483646';
this.z_Close = '2147483647';
this.WA_aoCalls = new Array();
this.DontShow_Button = '1';
this.m3d_360 = '';
this.Flag_No_Wait_Click = '';
this.If_No_Exists_Chang_To = '';
this.User_Ring_No_Exist = '';
this.Flag_Put_Button = '';
this.Count_Repite_Print_HTML = 1;
this.WA___User_Array = (',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,').split(',');
this.iFrame_Orientation = '';
this.Flag_Work_BO = '';
this.URL_Execute_Domain = 'https://rtr.vto.jewelry/';
this.URL_Execute_Page = '';
this.Parent_Domain = 'https://rtr.vto.jewelry';
this.Ring_Try_Yourself = '';
this.SID = 'u1kt8l6_250131023314';
this.Mode = '';
this.Btn_Close_No_Show = '0';
this.Flag_Use_Google_Tag_Events = '0';
this.Icon_Parent_Button = 'Include/Inova/Images/Buttons/en/hand_1.png';
this.Icon_Parent_Style = '';
this.Flag_Block_Ring_ID = '';
this.From_Check_Exists_Ring = '';
this.BO_Parameter_URL = '';
this.Cur_Language = 'en';
this.Product_Page = '';
this.Server_Stat = '';
this.Flag_Parent_Page = '';
this.Flag_UnLoad = '';
this.Flag_Load_Button = '';
this.Flag_Show_SID = '';
this.Product_Code = '';
this.xmlObj;
this.This_IP = '18.118.0.93';
this.Dop_URL_Param = '';
this.Ring_Show_Change = '';
this.Work_Mode_Design = '';
this.Colors_3D = '';
this.Param_3D = '';
this.iFrame_Target = '';
this.Left_Panel_No = '';
this.Flag_3D_Not_Resizable = '';
this.Texture_Relation = '';
this.Shape_Relation = '';
this.Mode_Open_iFrame = '';
//this.Algo_3D_Mode = '1';
this.Algo_3D_Mode = '';
this.ID_iFrame_Mod_3D = '';
this.Default_3D_Shape = '';
this.Default_3D_Texture = '';
this.flag_load_3D = false;
this.Temp_Var_iFrame = '';
try {
window.addEventListener("beforeunload", function () {
cls_InovaDiamonds_Iframe.Send_Unload();
});
window.addEventListener("resize", function () {
cls_InovaDiamonds_Iframe.Put_Size_iFrame();
});
window.addEventListener("orientationchange", function () {
cls_InovaDiamonds_Iframe.Orientation_Change();
});
window.addEventListener("message", function (event) {
cls_InovaDiamonds_Iframe.WA___Listener(event);
});
}
catch (_e) { }
}
Prepare_Post_Message(Ar_Val){
var st_ch = Ar_Val[0] + '=' + Ar_Val[1];
if (st_ch != '=') {
if (Ar_Val[0] == '') {
Ar_Val[0] = this.Default_3D_Shape;
st_ch = Ar_Val[0] + '=' + Ar_Val[1];
}
if (Ar_Val[1] == '') {
Ar_Val[1] = this.Default_3D_Texture;
st_ch = Ar_Val[0] + '=' + Ar_Val[1];
}
if (this.Shape_3D_Test != st_ch) {
this.Shape_3D_Test = st_ch;
cls_InovaDiamonds_Iframe.iFrame_postMessage("shape_center:" + st_ch, cls_InovaDiamonds_Iframe.ID_iFrame_Mod_3D)
}
}
if (Ar_Val[2] != this.Color_3D_Test) {
this.Color_3D_Test = Ar_Val[2]
if (Ar_Val[2].length == 1) {
Ar_Val[2] += '-14'
}
cls_InovaDiamonds_Iframe.iFrame_postMessage("color:" + Ar_Val[2], cls_InovaDiamonds_Iframe.ID_iFrame_Mod_3D);
}
if (this.isNumeric(Ar_Val[3].replace(/ /g, '').replace('.', ''))) {
if (Ar_Val[3] != this.Carat_3D_Test) {
this.Carat_3D_Test = Ar_Val[3]
cls_InovaDiamonds_Iframe.iFrame_postMessage("carat:" + Ar_Val[3], cls_InovaDiamonds_Iframe.ID_iFrame_Mod_3D);
}
}
}
Currient_IP() {
if (this.This_IP == '149.106.241.237') {
return (true)
}
return (false)
}
check_Browser() {
if (cls_InovaDiamonds_Iframe.Work_Mode_Design != '') {
cls_InovaDiamonds_Iframe.WA___Flag_Mobile = cls_InovaDiamonds_Iframe.Work_Mode_Design;
return ('')
}
cls_InovaDiamonds_Iframe.WA___Flag_Mobile = '0';
if (cls_InovaDiamonds_Iframe.Get_Orientation() == '1') {
cls_InovaDiamonds_Iframe.WA___Flag_Mobile = '1';
}
else {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
cls_InovaDiamonds_Iframe.WA___Flag_Mobile = '1';
}
}
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
cls_InovaDiamonds_Iframe.WA___Flag_iPhone = true
cls_InovaDiamonds_Iframe.WA___iPhone_Stat = true
}
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile != '1') {
cls_InovaDiamonds_Iframe.WA___Flag_iPhone = false
if (navigator.userAgent.indexOf('Mac') > 0) {
cls_InovaDiamonds_Iframe.WA___iPhone_Stat = true
}
}
}
stopEvent(event) {
event.stopPropagation();
event.stopImmediatePropagation();
}
Get_Orientation() {
if (cls_InovaDiamonds_Iframe.Work_Mode_Design != '') {
return (cls_InovaDiamonds_Iframe.Work_Mode_Design)
}
try {
var orientation;
try {
orientation = (screen.orientation.type || screen.mozOrientation || screen.msOrientation);
}
catch (e) {
orientation = (screen.orientation || screen.mozOrientation || screen.msOrientation);
}
if (orientation != undefined) {
if (orientation.indexOf('landscape') >= 0) { return ('0') }
else if (orientation.indexOf('portrait') >= 0) { return ('1') }
}
else {
var query = window.matchMedia("(orientation:landscape)");
if (query.matches == true) {
return ('0')
}
query = window.matchMedia("(orientation:portrait)");
if (query.matches == true) {
return ('1')
}
var W = screen.width;
var H = screen.height;
if (W > H) {
return ('0')
}
else {
return ('1')
}
}
}
catch (e) { }
return ('0')
}
User___Data(Query_From, mode) {
if (cls_InovaDiamonds_Iframe.Flag_Block_Ring_ID != '') {
return ('')
}
if (cls_InovaDiamonds_Iframe.Ring_Try_Yourself != '') {
cls_InovaDiamonds_Iframe.User_Ring = cls_InovaDiamonds_Iframe.Ring_Try_Yourself;
return ('');
}
else if (('') != '') {
cls_InovaDiamonds_Iframe.User_Ring = '^work_qr';
cls_InovaDiamonds_Iframe.Flag_No_Wait_Click = '1';
return ('');
}
else if (document.location.href.indexOf('__User_x_Inova_Design_Colors') > 0) {
cls_InovaDiamonds_Iframe.User_Ring = cls_InovaDiamonds_Iframe.Default_For_Design();
if (cls_InovaDiamonds_Iframe.User_Ring == '') {
cls_InovaDiamonds_Iframe.User_Ring = '4069';
}
cls_InovaDiamonds_Iframe.Flag_No_Wait_Click = '1';
var tmp = cls_InovaDiamonds_Iframe.get_From_Query('Step');
if (tmp == '1') {
cls_InovaDiamonds_Iframe.Work_Mode_Design = '1'
}
else if (tmp == '5') {
cls_InovaDiamonds_Iframe.Work_Mode_Design = '0'
}
return ('')
}
if (document.getElementById('List_All_Id_Ring_SDJWERGBWREH')) {
if (document.getElementById('List_All_Id_Ring_SDJWERGBWREH').value != '') {
if (cls_InovaDiamonds_Iframe.From_Check_Exists_Ring == '') {
cls_InovaDiamonds_Iframe.Flag_Block_Ring_ID = '1';
cls_InovaDiamonds_Iframe.User_Ring = document.getElementById('List_All_Id_Ring_SDJWERGBWREH').value;
}
else {
cls_InovaDiamonds_Iframe.User_Ring = '4069'
}
return ('');
}
}
var tmp = cls_InovaDiamonds_Iframe.get_From_Query('show_ring');
if (tmp != '') {
cls_InovaDiamonds_Iframe.User_Ring = tmp + '^metall:w';
cls_InovaDiamonds_Iframe.Flag_No_Wait_Click = '1';
}
else {
return (cls_InovaDiamonds_Iframe.Get_Info_Product(Query_From, mode));
}
}
Check_Ring_Id(Query_From) {
if (cls_InovaDiamonds_Iframe.Flag_Page_Success != '') {
return ('');
}
var Flag_Repite = 0;
try {
var ret = cls_InovaDiamonds_Iframe.User___Data('check', Query_From);
if (ret == 'abba') {
return ('')
}
if (cls_InovaDiamonds_Iframe.User_Ring == '') {
Flag_Repite = 1;
}
}
catch (e) {
Flag_Repite = 1;
}
if (Flag_Repite == 1) {
cls_InovaDiamonds_Iframe.Count_Repite_Print_HTML += 1;
if (cls_InovaDiamonds_Iframe.Count_Repite_Print_HTML < 15) {
setTimeout(function () {
cls_InovaDiamonds_Iframe.Check_Ring_Id();
}, 1000);
}
return ('');
}
if (cls_InovaDiamonds_Iframe.Ring_Try_Yourself != '') {
cls_InovaDiamonds_Iframe.check_Browser();
cls_InovaDiamonds_Iframe.print_HTML_Go('none');
cls_InovaDiamonds_Iframe.Inova__OpenFrame();
}
else {
cls_InovaDiamonds_Iframe.Check_Ring_Exists('Check_Exist_Ring', '');
}
}
Show_Ring(Id_Ring, Flag_Mode_ring, Flag_From_BO, BO_Parameter, URL_Param) {
if (Flag_From_BO == 'BO_Next') {
var ar = document.getElementsByTagName('IMG')
for (var i = 0; i < ar.length; i++) {
var on = ar[i].parentNode.getAttribute('onclick')
if (on) {
if (on.indexOf('Show_Ring') > 0) {
if (on.indexOf("'" + document.getElementById('List_All_Id_Ring_SDJWERGBWREH').value + "'") > 0) {
for (var j = i + 1; j < ar.length; j++) {
var on = ar[j].parentNode.getAttribute('onclick')
if (on) {
if (on.indexOf('Show_Ring') > 0) {
ar[j].parentNode.click()
return ('')
}
}
}
}
}
}
}
}
if (!document.getElementById('BO_Next')) {
if (document.location.href.indexOf('btn=NEXT') > 0) {
var o = document.createElement('DIV');
o.id = 'BO_Next';
o.setAttribute('style', 'padding:11px;position:fixed;left:11px;top:11px;z-index:55');
o.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.Show_Ring("","","BO_Next")')
o.innerHTML = 'NEXT'
var p = document.getElementById('Tst_Btm')
p.style.zIndex = this.z_Close;
p.appendChild(o)
}
}
if (URL_Param) {
var ar = URL_Param.split(':');
if (ar[0] == 'URL_Param') {
cls_InovaDiamonds_Iframe.Dop_URL_Param = ar[1]
}
}
cls_InovaDiamonds_Iframe.check_Browser()
cls_InovaDiamonds_Iframe.Flag_Block_Ring_ID = '';
if (Flag_From_BO == 'BO') {
cls_InovaDiamonds_Iframe.Flag_Work_BO = 'BO'
}
if (!document.getElementById('List_All_Id_Ring_SDJWERGBWREH')) {
cls_InovaDiamonds_Iframe.build_Input()
}
document.getElementById('List_All_Id_Ring_SDJWERGBWREH').value = Id_Ring;
if (Flag_Mode_ring == '360') {
cls_InovaDiamonds_Iframe.m3d_360 = '1';
}
else if (Flag_Mode_ring == 'm3d') {
cls_InovaDiamonds_Iframe.m3d_360 = '2';
}
if (BO_Parameter) {
cls_InovaDiamonds_Iframe.BO_Parameter_URL = BO_Parameter;
}
if (cls_InovaDiamonds_Iframe.m3d_360 != '') {
cls_InovaDiamonds_Iframe.Inova__OpenFrame('m3d');
}
else {
cls_InovaDiamonds_Iframe.Inova__OpenFrame();
}
}
build_Input() {
var o = document.createElement('INPUT');
o.type = 'hidden';
o.id = 'List_All_Id_Ring_SDJWERGBWREH';
o.value = '';
document.body.appendChild(o);
}
print_HTML(data, type_prod, rng_3DM) {
cls_InovaDiamonds_Iframe.check_Browser();
var _View = 'none';
if (document.location.href.indexOf('.html') > 0) {
_View = 'block';
}
if (cls_InovaDiamonds_Iframe.Ring_Try_Yourself != '') {
_View = 'none';
}
if (cls_InovaDiamonds_Iframe.Mode == 'list') {
if (!document.getElementById('List_All_Id_Ring_SDJWERGBWREH')) {
cls_InovaDiamonds_Iframe.build_Input();
}
}
if (cls_InovaDiamonds_Iframe.Mode == 'list_bo') {
cls_InovaDiamonds_Iframe.print_HTML_Go(_View)
return ('')
}
try {
if (cls_InovaDiamonds_Iframe.Flag_No_Wait_Click == '') {
var d_View = cls_InovaDiamonds_Iframe.Print_Buttons(data, type_prod, rng_3DM);
if (rng_3DM == '1') {
if (cls_InovaDiamonds_Iframe.Algo_3D_Mode == '1') {
cls_InovaDiamonds_Iframe.Mode_Open_iFrame = 'preload_pred'
cls_InovaDiamonds_Iframe.Inova__OpenFrame("m3d")
}
}
if (d_View != '') {
_View = d_View;
}
}
}
catch (e) {
cls_InovaDiamonds_Iframe.Count_Repite_Print_HTML += 1
if (cls_InovaDiamonds_Iframe.Count_Repite_Print_HTML < 100) {
setTimeout(function () {
cls_InovaDiamonds_Iframe.print_HTML(data, type_prod, rng_3DM);
}, 50);
}
else {
}
return ('');
}
cls_InovaDiamonds_Iframe.print_HTML_Go(_View)
}
//Send_Images_To_Server(st_Images) {
// var url = cls_InovaDiamonds_Iframe.URL_Execute_Domain
// + cls_InovaDiamonds_Iframe.URL_Execute_Page + '?mode=error_write_button'
// cls_InovaDiamonds_Iframe.__Send_Stat_toServer(url, 'cls_InovaDiamonds_Iframe.Send_Images_To_Server_Go()');
//}
build_Tst_Btm(){
if (!cls_InovaDiamonds_Iframe.obj('Tst_Btm')) {
var p = document.createElement('DIV');
p.id = 'Tst_Btm';
p.setAttribute('style', 'position:fixed;left:0px;bottom:0px;width:100%;z-index:-333;color:transparent');
p.innerHTML = 'AAAAAAA'
document.body.appendChild(p)
}
}
print_HTML_Go(_View) {
var html = ''
if (_View != 'none') {
html += '' +
''
}
else {
html += '' +
'';
}
var d = document.createElement('DIV')
d.id = 'WA_Paas_DivBack'
d.setAttribute('style', 'opacity:0.2;position:fixed;left:0px;top:0px;right:0px;bottom:0px;background-color:#A9A9A9;display:none;z-index:-1000000000;');
d.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.WA___Close_iFrame();')
document.body.appendChild(d)
cls_InovaDiamonds_Iframe.build_Tst_Btm();
var Ar = document.getElementsByTagName("SCRIPT");
for (var i = 0; i < Ar.length; i++) {
if (Ar[i].getAttribute('src') == null) { } else {
if (Ar[i].getAttribute('src').indexOf('?d=819') > 0 ||
Ar[i].getAttribute('src').indexOf('&d=819') > 0 ||
Ar[i].getAttribute('src').indexOf('vto.jewelry') > 0) {
var el = document.createElement("SPAN");
el.style.display = 'block';
var ar_url = document.location.href.split('/');
var lCode = ar_url[ar_url.length - 1].split('.')[0].split('-')[0].split('_')[0];
if ('819' == '633' ||
'819' == '676' ||
'819' == lCode) {
el.style.width = '55px';
el.style.height = '55px';
}
else if ('819' == '641' ||
'819' == '662') {
el.style.width = '100%';
el.style.height = '100%';
}
else {
el.style.width = '0px';
el.style.height = '0px';
el.style.overflow = 'hidden';
}
el.innerHTML = html;
if (Ar[i].parentNode.tagName.toLowerCase() == 'head') {
document.body.appendChild(el)
}
else {
Ar[i].parentNode.insertBefore(el, Ar[i]);
}
break;
}
}
}
if ('819' == '640') {
try { document.getElementById("inova-image").style.display = 'block'; } catch (e) { }
}
else if ('819' == '670' ||
'819' == '676' ||
'819' == '677' ||
'819' == '680' ||
cls_InovaDiamonds_Iframe.DontShow_Button == '1') {
}
else {
//document.getElementById("WA_Paas_Img").style.display = 'block';
}
}
Hide_Button() {
try {
document.getElementById("AR-thumbnail").style.display = 'none';
} catch (e) {
setTimeout(function () {
cls_InovaDiamonds_Iframe.Hide_Button();
}, 20);
}
}
User_Data_Stat_Pay(Source, summ, SKUs) {
cls_InovaDiamonds_Iframe.Flag_Page_Success = '1';
var url = cls_InovaDiamonds_Iframe.Server_Stat
+ '?mode=Save_Summa_Pay&Summa_Pay=' + summ + '&SKUs=' + SKUs + '&source_from=';
if (summ === 'undefined' || summ === 'NaN' || summ == '' || summ == 0) {
url = cls_InovaDiamonds_Iframe.__Send_Stat_toServer_URL(url + 'Reeds_0')
var DV = document.createElement('DIV');
var ar = document.body.innerHTML.split('