function EMail(_1){var _2="0123456789-abcdefghijklmnopqrstuvwxyz_@.ABCDEFGHIJKLMNOPQRSTUVWXYZ";var _3;var _4;for(var i=0;i<_1.length;i++){_3=_1.substring(i,i+1);if(_2.indexOf(_3)==-1){return false;}}_4=_1;if(_4.indexOf("@")!=_4.lastIndexOf("@")){return false;}if(_4.indexOf("@")<=1||_4.indexOf(".")<1||_4.length<6){return false;}var _6=_4.indexOf(".")-_4.indexOf("@");if(_6==1){return false;}if((_4.lastIndexOf(".")-_4.length)==-1){return false;}if((_4.lastIndexOf(".")-_4.lastIndexOf("@"))<=0){return false;}if((_4.indexOf(".")-_4.lastIndexOf("."))==-1){return false;}if((_4.indexOf("@")-_4.lastIndexOf("@"))!=0){return false;}if(_4.length-(_4.indexOf(".")+1)<=1){return false;}return true;}function CreateRowForCoupon(){var _7,tdElem;var _8;CouponRowCount=document.forms[0].ctl00$ContentPlaceHolder1$HdnCouponCount.value;var _9="from";var _a=document.getElementById("ctl00_ContentPlaceHolder1_CouponTable").getElementsByTagName("tbody")[0];_8="ctl00_ContentPlaceHolder1_CouponRow"+CouponRowCount;_7=document.createElement("tr");_7.id=_8;tdElem=document.createElement("td");tdElem.innerHTML="<input type=text name="+"FltRAmountRangeFrom_"+CouponRowCount+" class='invisiblenumericbox' Value='0' OnBlur='ValidateHTMLAmountFrom("+CouponRowCount+",1)'>";tdElem.width="250px";_7.appendChild(tdElem);tdElem=document.createElement("td");tdElem.width="200px";tdElem.innerHTML="<input type=text name="+"FltRAmountRangeTo_"+CouponRowCount+" class='invisiblenumericbox' Value='0'>";_7.appendChild(tdElem);tdElem=document.createElement("td");tdElem.width="200px";tdElem.innerHTML="&nbsp;<input type=radio name="+"OptRRadio_"+CouponRowCount+" Checked='true' value='$'>$&nbsp;<input type='radio' value='%' name="+"OptRRadio_"+CouponRowCount+">%";_7.appendChild(tdElem);tdElem=document.createElement("td");tdElem.innerHTML="<input type=text name="+"FltRCouponAmount_"+CouponRowCount+" class='invisiblenumericbox' OnFocus='ValidateHTMLAmountFrom("+CouponRowCount+",2)'>";tdElem.width="70px";_7.appendChild(tdElem);tdElem=document.createElement("td");tdElem.align="middle";tdElem.width="20px";tdElem.innerHTML="<a href=\"javascript:DeleteCouponRow('"+CouponRowCount+"');\"><img src='../App_Themes/Themes_Alts/Delete.gif' style='width:15px;' border=0;></a>";_7.appendChild(tdElem);_a.appendChild(_7);CouponRowCount++;document.forms[0].ctl00$ContentPlaceHolder1$HdnCouponCount.value=CouponRowCount;}function DeleteCouponRow(_b){var _c="ctl00_ContentPlaceHolder1_CouponRow"+_b;var _d=document.getElementById(_c);if(confirm("Do you want to delete this Row?")){_d.removeNode(true);}}function CheckRadioButton(){var _e=document.getElementById("ctl00$ContentPlaceHolder1$HdnOFramerCount");var _f;for(var i=0;i<_e.value;i++){_f="ctl00_ContentPlaceHolder1_RadRFramerSelection_"+i;if(document.getElementById(_f).checked==true){document.getElementById("ctl00$ContentPlaceHolder1$HdnOFramerId").value=document.getElementById(_f).value;}}return true;}function CheckCheckBoxButton(){var _11=document.forms[0].ctl00_ContentPlaceHolder1_HdnOFramerCount.value;var _12;var k;var cnt=0;for(intCounter=0;intCounter<document.forms[0].elements.length;intCounter++){objControl=document.forms[0].elements[intCounter];if(objControl.type=="checkbox"&&objControl.checked){cnt++;}}if(cnt>1){alert("Please Select Only One Framer from the list");return false;}else{if(cnt==0){alert("Please Select One Framer from the list");return false;}else{for(intCounter=0;intCounter<document.forms[0].elements.length;intCounter++){objControl=document.forms[0].elements[intCounter];if(objControl.type=="checkbox"&&objControl.checked){document.forms[0].ctl00_ContentPlaceHolder1_HdnOFramerId.value=objControl.value;return true;}}return true;}}return false;}function togglemenu(obj,_16){oImg=document.getElementById("ctl00_ContentPlaceHolder1_"+_16);var _17=document.getElementById(oImg);var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";oImg.src="../App_Themes/Themes_Alts/whitetogglenext.jpg";}else{el.style.display="";oImg.src="../App_Themes/Themes_Alts/whitetoggledown.jpg";}}function togglefaq(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}}function togglesitemap(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}toggleAdvsearchlink();}function toggleAdvsearchlink(){var elt=document.getElementById("AdvSearchLink");if(elt.style.display=="none"){elt.style.display="";}else{elt.style.display="none";}}function togglefreq(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}toggleAdvsearchlink();}function togglePriPol(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}toggleAdvsearchlink();}function toggleglossary(obj){var el=document.getElementById("AdvSearch");if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}toggleAdvsearchlink();}function toggleAdvSearch(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}toggleAdvsearchlink();if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}}function toggleMyAccount(obj){var el=document.getElementById(obj);if(el.style.display!="none"){el.style.display="none";}else{el.style.display="";}toggleAdvsearchlink();if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}}function toggleForArtists(obj){var el=document.getElementById(obj);if(el.style.display=="none"){el.style.display="block";}else{if(el.style.display=="block"){el.style.display="none";}}if(document.getElementById("trbgcolor").className=="redbgcolor"){document.getElementById("trbgcolor").className="whitebgcolor";}else{document.getElementById("trbgcolor").className="redbgcolor";}toggleAdvsearchlink();}function togglelinks(){document.getElementById("ctl00$ContentPlaceHolder1$TxtOLogo_Path").style.display="block";document.getElementById("ctl00_ContentPlaceHolder1_LnkRemove").style.display="none";document.getElementById("ctl00_ContentPlaceHolder1_HLLogoPath").style.display="none";document.getElementById("ctl00$ContentPlaceHolder1$TxtOLogo_Path").focus();return false;}function CheckSearch(_2a){if(_2a=="Coupon"){if(document.getElementById("ctl00_ContentPlaceHolder1_TxtOCoupon_Name").value==""){document.getElementById("ctl00_ContentPlaceHolder1_TxtOCoupon_Name").focus();DisplayAlert("6");return false;}}/*if(_2a=="Artist"){if(document.getElementById("ctl00$ContentPlaceHolder1$TxtOArtist_Name").value==""){document.getElementById("ctl00$ContentPlaceHolder1$TxtOArtist_Name").focus();DisplayAlert("6");return false;}}*/if(_2a=="FilmStrip"){if(document.getElementById("ctl00$ContentPlaceHolder1$TxtOMaster_Name").value==""){document.getElementById("ctl00$ContentPlaceHolder1$TxtOMaster_Name").focus();DisplayAlert("6");return false;}}}function OpenSweepStakePrint(){var ah=screen.availHeight-10-30;var aw=screen.availWidth-10-350;window.open("EntryForm.aspx","newWnd","left=0,top=0,width="+aw+",height="+ah+",resizable=no,maxbutton=no,toolbar=no,menubar=no,scrollbars=yes");}function OpenMygalleryLoginScreen(){var _2d=(screen.height/2)+250;var _2e=(screen.height/2)+230;if(screen.width>800){url="MyGallery_login.aspx?MsgId=2&ImageId=";var _2f=window.open(url,"newWnd","width=675,left=0,top=0,height="+_2d+",toolbars=0,maxbutton=no,scrollbars=yes,resizable=no");}else{url1="MyGallery_login.aspx?MsgId=2&ImageId=";var _30=window.open(url1,"newWnd","width=675,left=0,top=0,height="+_2e+",toolbars=0,maxbutton=no,scrollbars=yes,resizable=no");}}function OpenAccountLoginScreen(_31){var _32=(screen.height/2)+294;var _33=(screen.height/2)+230;if(screen.width>800){url="LJPopupScreen.aspx?MsgId="+_31+"&Status=Account";var _34=window.open(url,"PopUp","width=535,left=0,top=0,height="+_32+",toolbars=0,scrollbars=yes,maxbutton=no,resizable=no");}else{url1="LJPopupScreen.aspx?MsgId="+_31+"&Status=Account";var _35=window.open(url1,"PopUp","width=535,left=0,top=0,height="+_33+",toolbars=0,scrollbars=yes,maxbutton=no,resizable=no");}}function DoDeleteCategory(_36){var _37=Category.GetCategoryInfo(_36).value;if(_37<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Category cant be Deleted");}return false;}function DoDeleteDesign(_38){var _39=Design.GetDesignInfo(_38).value;if(_39<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Design cant be Deleted");}return false;}function DoDeleteRoom(_3a){var _3b=Room.GetRoomInfo(_3a).value;if(_3b<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Room cant be Deleted");}return false;}function DoDeleteColor(_3c){var _3d=Color.GetColorInfo(_3c).value;if(_3d<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Color cant be Deleted");}return false;}function DoDeleteSubstrate(_3e){var _3f=SubstrateGroup.GetSubstrateInfo(_3e).value;if(_3f<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Substrate cant be Deleted");}return false;}function DoDeletePressMaster(_40){var _41=PressMaster.GetPressMasterInfo(_40).value;if(_41<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Press Name cant be Deleted");}return false;}function DoDeletePressRelease(_42){if(confirm("Do You want to Delete?")){return true;}return false;}function DoDeleteArtist(_43){var _44=Artist.GetArtistInfo(_43).value;if(_44<=0){if(confirm("Do You want to Delete?")){return true;}return false;}else{alert("Artist cant be Deleted");}return false;}function HideAccountDivTag(_45){var el=document.getElementById("Acnumber");var nam=document.getElementById("name");var fra=document.getElementById("framer");if(_45=="F"){el.style.display="";fra.style.display="";nam.style.display="none";}else{el.style.display="none";fra.style.display="none";nam.style.display="";}}function HideAvailQty(_49){var hid=document.getElementById("hidQty");var nam=document.getElementById("name");var fra=document.getElementById("framer");if(_49=="L"){hid.style.display="";nam.style.display="";fra.style.display="none";}else{hid.style.display="none";nam.style.display="none";fra.style.display="";}}function DoSaveValidate(_4d){var _4e=document.getElementById("ctl00_ContentPlaceHolder1_DatRFrom_Date").value;var _4f=document.getElementById("ctl00_ContentPlaceHolder1_DatRTo_Date").value;var _50=document.getElementById("ctl00$ContentPlaceHolder1$HdnOCouponId").value;rcount=document.forms[0].ctl00$ContentPlaceHolder1$HdnCouponCount.value;var _51=new Date();var _52=(_51.getMonth()+1)+"/"+_51.getDate()+"/"+_51.getFullYear();if(validateForm()){if(DateDiff(_52,_4e,"mm/dd/yyyy")<=0){}else{alert("From Date must be greater than Current Date");return false;}if(DateDiff(_4e,_4f,"mm/dd/yyyy")<=0){}else{alert("To Date must be greater than From Date");return false;}if(_4d=="Add"){var _53=Coupon.CheckCouponDate(_4e,_4f).value;if(_53!=0){alert("Already have a Coupon on these days");return false;}else{return true;}}else{var _54=Coupon.CheckCouponEditDate(_4e,_4f,_50).value;if(_54!=0){alert("Already have a Coupon on these days");return false;}else{return true;}}}else{return false;}}function ValidateAmount(_55){if(_55<=2){if(document.getElementById("ctl00_ContentPlaceHolder1_FltRAmountRangeFrom_"+_55).value>document.getElementById("ctl00_ContentPlaceHolder1_FltRAmountRangeTo_"+_55).value){alert("Amount To must be greater than Amount From");document.getElementById("ctl00_ContentPlaceHolder1_FltRAmountRangeTo_"+_55).focus();return false;}}else{if(document.getElementById("FltRAmountRangeFrom_"+_55).value>document.getElementById("FltRAmountRangeTo_"+_55).value){alert("Amount To must be greater than Amount From");document.getElementById("FltRAmountRangeTo_"+_55).focus();return false;}}}function ValidateAmountFrom(_56,_57){var _58="ctl00$ContentPlaceHolder1$FltRAmountRangeFrom_"+_56;var _59="ctl00$ContentPlaceHolder1$FltRAmountRangeTo_"+_56;var _5a="ctl00$ContentPlaceHolder1$FltRAmountRangeTo_"+(_56-1);if(_57=="to"){if(parseInt(document.getElementById(_58).value)>=parseInt(document.getElementById(_59).value)){alert("From Amount is greater than To Amount");document.getElementById(_59).focus();return false;}}else{if(parseInt(document.getElementById(_5a).value)>=parseInt(document.getElementById(_58).value)){alert("From Amount is lesser than Previous To Amount");document.getElementById(_58).focus();return false;}}return true;}function ValidateHTMLAmountFrom(_5b,_5c){var _5d="FltRAmountRangeFrom_"+_5b;var _5e="FltRAmountRangeTo_"+_5b;var _5f="FltRAmountRangeTo_"+(_5b-1);var _60="ctl00$ContentPlaceHolder1$FltRAmountRangeTo_"+(_5b-1);if(_5c==2){if(parseInt(document.getElementById(_5d).value)>=parseInt(document.getElementById(_5e).value)){alert("From Amount is greater than To Amount");document.getElementById(_5e).focus();return false;}}else{if(_5b==3){if(parseInt(document.getElementById(_60).value)>=parseInt(document.getElementById(_5d).value)){alert("From Amount is lesser than Previous To Amount");document.getElementById(_5d).focus();return false;}}else{if(parseInt(document.getElementById(_5f).value)>parseInt(document.getElementById(_5d).value)){alert("From Amount is lesser than Previous To Amount");document.getElementById(_5d).focus();return false;}}}return true;}function DoValidationinSelectFramer(){if(document.getElementById("ctl00$ContentPlaceHolder1$TxtRZip_Code").value!=""){return true;}alert("Enter ZipCode");document.getElementById("ctl00$ContentPlaceHolder1$TxtRZip_Code").focus();return false;}function DoValidationinPage(_61){if(validateForm()){if(_61=="Add"){if(DisplayAlert("1")){return true;}else{return false;}}else{if(DisplayAlert("2")){return true;}else{return false;}}}else{return false;}}function DoValidateForm(_62){if(validateForm()){if(_62=="Add"){if(DisplayAlert("1")){return true;}else{return false;}}else{if(DisplayAlert("2")){return true;}else{return false;}}}else{return false;}}function DoValidateFormwoConfirm(){if(validateForm()){return true;}else{return false;}}function DoSubstrateValidation(_63){var _64="ctl00$ContentPlaceHolder1$FltRMin_Small";var _65="ctl00$ContentPlaceHolder1$FltRMin_Large";var _66="ctl00$ContentPlaceHolder1$FltRMax_Small";var _67="ctl00$ContentPlaceHolder1$FltRMax_Large";if(validateForm()){if(parseInt(document.getElementById(_64).value)<parseInt(document.getElementById(_65).value)){if(parseInt(document.getElementById(_66).value)>parseInt(document.getElementById(_65).value)){if(parseInt(document.getElementById(_66).value)<parseInt(document.getElementById(_67).value)){alert("All Number are valid");DisplayAlert("1");return true;}alert("maxsmall greater than maxlarge");return false;}alert("maxsmall less than minlarge");return false;}alert("minsmall greater than minlarge");return false;if(DisplayAlert("1")){return true;}else{return false;}}else{return false;}}function DoArtistValidation(){if(!document.getElementById("ctl00$ContentPlaceHolder1$rblgroup").checked){if(document.getElementById("ctl00$ContentPlaceHolder1$TxtRArtist_First_Name").value==""){alert("'FirstName is required'");return false;}}if(document.getElementById("ctl00$ContentPlaceHolder1$TxtRArtist_Last_Name").value==""){alert("'LastName is required'");return false;}if(document.getElementById("ctl00$ContentPlaceHolder1$TxtOBio_Data").value==""){alert("'Bio Data is required'");return false;}var bio=document.getElementById("ctl00_ContentPlaceHolder1_TxtOBio_Data").value;var ext=bio.split(".");var _6a=ext[1];if(_6a!="rtf"&&_6a!="RTF"){alert("Rtf file only Allow for Bio-Data!...");return false;}var _6b=document.getElementById("ctl00_ContentPlaceHolder1_TxtOArtist_Video").value;if(_6b!=""){var _6c=_6b.split(".");var _6d=_6c[1];if(_6d!="wmv"&&_6d!="WMV"){alert("WMV file format only Allow for Videos!...");return false;}}var _6e=document.getElementById("ctl00_ContentPlaceHolder1_TxtOArtist_Photo").value;if(_6e!=""){var _6f=_6e.split(".");var _70=_6f[1];if(_70!="jpg"&&_70!="JPG"){alert("JPG file format only Allow for Photos!...");return false;}}if(DisplayAlert("1")){return true;}else{return false;}}function DoArtistValidation3(){if(!document.getElementById("ctl00$ContentPlaceHolder1$rblgroup").checked){if(document.getElementById("ctl00$ContentPlaceHolder1$TxtRArtist_First_Name").value==""){alert("'FirstName is required'");return false;}}if(document.getElementById("ctl00$ContentPlaceHolder1$TxtRArtist_Last_Name").value==""){alert("'LastName is required'");return false;}if(DisplayAlert("2")){return true;}else{return false;}}function validate(){alert("ok");return false;}function OpenPopupScreen(_71){url="LJPopupScreen.aspx?MsgId="+_71;var _72=window.open(url,"PopUp","width=514,left=0,top=0,height=530,toolbars=0,maxbutton=no,scrollbars=no,resizable=no");}function OpenPopupScreenforLogin(_73){var _74=(screen.height/2)+294;var _75=(screen.height/2)+230;if(screen.width>800){url="LJPopupScreen.aspx?MsgId="+_73+"&Status=";var _76=window.open(url,"PopUp","left=0,top=0,width=535,height="+_74+",toolbars=0,maxbutton=no,scrollbars=yes,resizable=no");}else{url1="LJPopupScreen.aspx?MsgId="+_73+"&Status=";var _77=window.open(url1,"PopUp","left=0,top=0,width=535,height="+_75+",toolbars=0,maxbutton=no,scrollbars=yes,resizable=no");}}function PrintScreen(_78){url="PrintScreen.aspx?"+_78;var _79=window.open(url,"PopUp","width=514,left=0,top=0,height=530,toolbars=0,maxbutton=no,resizable=no");}function OpenPopupScreenForImage(_7a,_7b){url="LJPopupScreen.aspx?MsgId="+_7a+"&ImageId="+_7b;var _7c=window.open(url,"PopUp","width=514,left=0,top=0,height=530,toolbars=0,maxbutton=no,resizable=no");}function OpenPopupScreenEmail(_7d,_7e){url="LJPopupScreen.aspx?MsgId="+_7d+"&UserId="+_7e;var _7f=window.open(url,"PopUp","width=514,left=0,top=0,height=530,toolbars=0,maxbutton=no,resizable=no");}function OpenPopupScreenGalleryPrint(_80,_81,_82,_83){url="PrintScreen.aspx?MsgId="+_80+"&UserId="+_81+"&CurrentIndex="+_82+"&PageSize="+_83;var _84=window.open(url,"PopUp","width=670,left=0,top=0,height=720,toolbars=0,maxbutton=no,resizable=no,scrollbars=yes");return false;}function OpenPopupScreenWParam(_85,_86,to){url="LJPopupScreen.aspx?MsgId="+_85+"&From="+_86+"&To="+to;var _88=window.open(url,"PopUp","width=514,left=0,top=0,height=530,toolbars=0,maxbutton=no,resizable=no");}function DoValidateSubsription(){if(validateForm()){var _89=document.getElementById("ctl00$ContentPlaceHolder1$TxtREmail").value;getEmailId=Subscription.CheckEmailId(_89).value;if(getEmailId>=1){alert("EmailId Already Exists!!!!");return false;}var s1=document.getElementById("ctl00$ContentPlaceHolder1$TxtREmail").value;var s2=document.getElementById("ctl00$ContentPlaceHolder1$TxtRConfirmEmail").value;if(s1!=s2){alert("Email Address and Confirm Email Address must be same");return false;}else{if(s1==""){alert("EmailId is required");return false;}}var s1=document.getElementById("ctl00$ContentPlaceHolder1$TxtRPassword").value;var s2=document.getElementById("ctl00$ContentPlaceHolder1$TxtRConfirmpassword").value;if(s1!=s2){alert("Password and Confirm Password must be same");return false;}else{if(s1==""){alert("Password is required");return false;}}var s1=document.getElementById("ctl00$ContentPlaceHolder1$TxtRFirstName").value;var s2=document.getElementById("ctl00$ContentPlaceHolder1$TxtRLastName").value;if(s1==""){alert("FirstName is required");return false;}else{if(s2==""){alert("LastName is required");return false;}}if(!isEMail(document.getElementById("ctl00$ContentPlaceHolder1$TxtREmail").value)){alert("Email address is not valid");return false;}if(DisplayAlert("1")){return true;}else{return false;}}else{return false;}}function PopupWindow(){OpenPopupScreen(6);return false;}function trimAll(_90){while(_90.substring(0,1)==" "){_90=_90.substring(1,_90.length);}while(_90.substring(_90.length-1,_90.length)==" "){_90=_90.substring(0,_90.length-1);}return _90;}