function getQueryVariable() { var variable = "ID"; var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0; i< vars.length;i++) { var pair = vars[i].split("="); if (pair[0].toLowerCase() == variable.toLowerCase()) return pair[1]; else return 11234; } } function compsearch(q) { window.location.href="/templates/MainSearch.aspx?src=15486&q="+q; } function ContinueShopping() { window.location.href= "LandingPage.aspx?id=4865"; } function dropMenu(id) { var menu = document.getElementById("dropmenu_id" + id); menu.style.display = "block"; } function proceed(tid) { window.location.href= "PublicationOrderInvoice.aspx?id=15032&tid="+tid; } function makestring(s) { if(s.src.value == "-1") { alert("Please select a section.\n"); return false; } var qry=""; var q1 = s.q1.value; if(q1.length>0) { var ss = q1.split(" "); var i=0; for(i=0; i < ss.length; i++) { if(ss[i].length > 0) qry += " +" + ss[i]; } } var q2 = s.q2.value; if(q2.length>0) { qry += " \"" + q2 + "\" "; } var q3 = s.q3.value; if(q3.length>0) { var ss = q3.split(" "); var i=0; for(i=0; i< ss.length; i++) { if( ss[i].length > 0) qry += " " + ss[i]; } } var q4 = s.q4.value; if(q4.length>0) { var ss = q4.split(" "); var i=0; for(i=0; i< ss.length; i++) { if(ss[i].length>0) qry += " -" + ss[i]; } } s.q.value = qry; return true; } function ChangeInBill() { window.location.href= "MyCart.aspx?id=10999"; } function DoPay(amt) { //alert(amt); if(amt!= "0" ) { window.location.href= "SSL_DOpay.asp?tid=131x4uutew234t55nucdox45"; } else { window.location.href= "PublicationOrderInvoice.aspx?id=15032&tid=131x4uutew234t55nucdox45"; } } function addtocart(PageID,Item,qty) { var url="/templates/Ajax.aspx?id=" + getQueryVariable("ID") + "&PID=" + PageID +"&Item="+ Item +"&Qty="+ qty +"&action=AddToCart"; //alert(url); if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } req.onreadystatechange = processRequest; req.open("GET", url, true); req.send(null); alert ("Added Successfully Click 'Shopping Cart' to complete your order"); } function processRequest() { if (req.readyState == 4) { if (req.status == 200) { parseMessages(); } } } function parseMessages() { response = req.responseXML.documentElement; itemDescription = response.getElementsByTagName('cart')[0].getAttribute("count"); if(document.getElementById('Cart').length>0) document.getElementById('Cart').innerHTML=itemDescription ; } function addtocartCheckOut(PageID,Item,qty,CheckOut) { window.location.href= "?id=" + getQueryVariable("ID") + "&PID=" + PageID +"&Item="+ Item +"&Qty="+ qty + "&CheckOut="+ CheckOut ; } function showcart() { window.location.href="MyCart.aspx?id=10999"; } function useredit() { window.location.href="UserEdit.aspx?id=15024"; } function removeitem(ItemID) { //alert(url); // if (window.XMLHttpRequest) { // req = new XMLHttpRequest(); //} else if (window.ActiveXObject) { // req = new ActiveXObject("Microsoft.XMLHTTP"); // } /// req.onreadystatechange = processRequest; // req.open("GET", url, true); //req.send(null); //var rw="row" + ItemID //var o=document.getElementById(rw); //o.style.display="none"; window.location.href= "MyCart.aspx?id=" + getQueryVariable("ID") + "&Item="+ItemID; } function PayNow() { window.location.href= "ShippingDetails.aspx?id=15000"; } function Calc(qty,ItemID) { //alert(ItemID); if(qty=="") { alert('Qty can not be null'); return; } if(isNaN(qty)) { alert('Please enter the Number'); return; } if(qty<0) { alert('Qty can not be less than 0'); return; } if(qty==0) { alert('Qty should be greater than 0'); return; } window.location.href= "MyCart.aspx?id=" + getQueryVariable("ID") + "&itemIdx="+ItemID + "&updqty=" + qty; } function ChangeAdd(tbn) { if(tbn=="1") { document.__aspnetForm.no.checked=false; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillingAddress.value=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_ShippingAddress.value; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillCity.value=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_ShipCity.value; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillState.value=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_ShipState.value; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillPinCode.value=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_ShipPinCode.value; var billcountryselectedindex=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_Billcountryname; var shipcountryselectedindex=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_Shipcountryname.selectedIndex; var ddlen=document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_Billcountryname.options.length; for(i=0;i< ddlen;i++) { if(i == shipcountryselectedindex) { document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_Billcountryname.options[i].selected=true; return; } } } else { document.__aspnetForm.yes.checked=false; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillingAddress.value=""; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillCity.value=""; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillState.value=""; document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_BillPinCode.value="" document.__aspnetForm.MainFramework1_Content1_ShippingDetail1_Billcountryname.options[97].selected=true; } } function olprint() { var wdoc = document; if(wdoc.getElementById("notrequired")) { var i = wdoc.getElementById("notrequired"); i.style.display = "none"; } if(wdoc.getElementById("mytable1")) { var l = wdoc.getElementById("mytable1"); l.style.display = "none"; } if(wdoc.getElementById("crnr")) { var j = wdoc.getElementById("crnr"); j.style.display = "none"; } if(wdoc.getElementById("nsrow")) { var l = wdoc.getElementById("nsrow"); l.style.display = "none"; } if(wdoc.getElementById("myrow")) { var my = wdoc.getElementById("myrow"); my.style.display = "none"; } if (wdoc.getElementById("mytable")) { var k= wdoc.getElementById("mytable"); k.style.width="0px"; } window.print(); } function LoginHelper(s) { var myMsg=document.getElementById("loginMsg"); if (s.selectedIndex==1 || s.selectedIndex==3 ) myMsg.innerHTML=' Provide the email address with which you registered'; else myMsg.innerHTML=''; }