﻿// JScript File

    function imgclick(s)
    {
        location.href="phones.aspx?Sel="+s;
    }
    function imgdesc(d)
    {
        location.href="product.aspx?desc="+d;
    }
    function imgdescription(d,myname, w, h, scroll)
    {
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
        win = window.open(d, myname, winprops)
    }
//    function addToCart(str, price, on0, os0, v0, on1, os1, v1)
//    {
//    //, on0, os0, v0, on1, os1, v1
//        //alert("hello");
//        var url=str;
//        //var amount=parseFloat(price)+parseFloat(v0)+parseFloat(v1);
//        var amount=price;
//        url=url+'&on0='+on0+'&os0='+os0 +'&on1='+on1+'&os1='+os1;
//        amount=''+amount+'';
//        if (amount.indexOf(".")>0)
//        {
//            if (amount.length < amount.indexOf(".")+3)amount=''+amount+'0';
//            if (amount.length > amount.indexOf(".")+3)
//            {
//                amount=amount.substring(0,amount.indexOf(".")+3);
//            }
//        }
//        //alert(amount);
//        url=url+'&amount='+amount;
//        var settings='height=470,width=620,top=5,left=10,scrollbars,status,resizable,location';
//        win=window.open(url,'paypal',settings);
//    }
//    function precart(p, title, s1, s2, h, id)
//    {
//        //alert("hello");
//        var temp1="https://www.paypal.com/cart/add=1&business=pagecenter@sbcglobal.net&item_name=";
//        temp1=temp1+title+'&item_number='+title+'&return=http://www.pagecenters.com&cancel_return=http://www.pagecenters.com&currency_code=USD&rm=2&shipping='+s1+'&shipping2='+s2+'&handling='+h;
//        //alert(temp1);
//        addToCart(temp1,p,'on0'+id,'os0'+id,'v0'+id,'on1'+id,'os1'+id,'v1'+id);
//        //,'on0'+id,'os0'+id,'v0'+id,'on1'+id,'os1'+id,'v1'+id
//    }


