function openNew(newUrl,width,height) { window.open(newUrl, "nothing", "menubar=no,toolbars=no,scrollbars=yes,status=no,width="+width+",height="+height+",resizable=yes,directories=no,left=150,top=100") } function openNamedWindow(newUrl,width,height, name) { window.open(newUrl, name, "menubar=no,toolbars=no,scrollbars=yes,status=no,width="+width+",height="+height+",resizable=yes,directories=no,left=150,top=100") } function SecureForm(Page) { document.forms.Form1.action = 'https://affiliates.art.com/' + Page; } function RedirectForm(Page) { document.forms.Form1.action = 'http://affiliates.art.com/' + Page; } function SelectAll(field, togglefield) { if (document.forms.Form1[field] != null) { if (document.forms.Form1[field].length == null || document.forms.Form1[field].length == undefined) { if (document.forms.Form1[togglefield].value == "no") { document.forms.Form1[field].checked = true; } else { document.forms.Form1[field].checked = false; } } else { for (var i = 0; i < document.forms.Form1[field].length; i++) { if (document.forms.Form1[togglefield].value == "no") { document.forms.Form1[field][i].checked = true; } else { document.forms.Form1[field][i].checked = false; } } } if (document.forms.Form1[togglefield].value == "yes") { document.forms.Form1[togglefield].value = "no"; } else { document.forms.Form1[togglefield].value = "yes"; } } } function GetAll(field, Type) { if (document.forms.Form1[field] != null) { var sIds = ""; var sTypes = ""; var count = 0; if (document.forms.Form1[field].length == null || document.forms.Form1[field].length == undefined) { if (document.forms.Form1[field].checked) { sIds = sIds + document.forms.Form1[field].value; sTypes = sTypes + document.forms.Form1["id_" + document.forms.Form1[field].value].value; count = 1; } } else { for (var i = 0; i < document.forms.Form1[field].length; i++) { if (document.forms.Form1[field][i].checked) { if (count >= 1) { sIds = sIds + ","; sTypes = sTypes + ","; } sIds = sIds + document.forms.Form1[field][i].value; sTypes = sTypes + document.forms.Form1["id_" + document.forms.Form1[field][i].value].value; count++; } } } if (count > 0) { if (Type == "virtualstore") { for (var i = 0; i < document.forms.Form1[field].length; i++) { document.forms.Form1[field][i].checked = false; } Frame2.location = 'virtualstorecurrent.aspx?p=' + sIds + '&s=' + sTypes; } else { openNew(Type + 'get.aspx?i=' + sIds + '&t=' + sTypes,600,500); } } else { alert('You must make at least one selection before you can get the HTML'); } } } function submit (Type) { var StoreList = document.forms.Form1.StoreList.options[document.forms.Form1.StoreList.selectedIndex].value if (Type == 'modify') { location.href = 'virtualstoremod.aspx?vs=' + StoreList; } else //view and get HTML { location.href = 'virtualstoreget.aspx?v=' + StoreList; } } function Rename(datafeedid, oldname) { //set the dfid value and then open the window to rename var df = document.getElementById("dfid"); df.value = datafeedid; var md = document.getElementById("mode"); md.value = "rename"; var myName = document.getElementById("datafeedname"); myName.value = oldname; //open the window to display the rename window window.open('namedf.aspx?m=r',null,'height=100,width=300,top=200,left=200,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'); } function TrackGAEvent(category, eventAction, eventLabel) { try { var msg = 'GA: Category: [' + category + '] Page Name: [' + eventAction + '] Event Action: [' + eventLabel + ']'; console.log(msg); } catch (e) { } if (typeof (_gaq) != "undefined") { _gaq.push(['t1._trackEvent', category, eventAction, eventLabel]); } }