	var bannedips=["122.55.22.82","202.184.120.2","125.60.241.121","117.6.96.193","58.186.235.186","202.90.57.252","123.20.12.138"];

	var ip = '<!--#echo var="REMOTE_ADDR"-->';

	var handleips=bannedips.join("|");
	handleips=new RegExp(handleips, "i");

	if (ip.search(handleips)!=-1)
	{ 
		alert("Your IP has been banned from this site. Redirecting...");
		window.location.replace("http://www.google.com");
	}

function ViewCart()
{
	
	document.writeln("<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">");	
	document.writeln("<table cellpadding=0 cellspacing=0 border=0>");	
	document.writeln("<tr valign=bottom>");	
	document.writeln("<td valign=bottom align=center>");	
	document.writeln("<input type=\"hidden\" name=\"cmd\" value=\"_cart\">");
	document.writeln("<input type=\"hidden\" name=\"business\" value=\"kohli290866@yahoo.com\">");
	document.writeln("<input type=\"image\" src=\"http://www.fashionjewelryforeveryone.com/PayPalImages/view_cart.jpg\" width=\"100\" height=\"36\" name=\"submit\" alt=\"PLEASE ALLOW POPUPS. CLICK to VIEW items in your cart. Safe & Secured Shopping! Pay with Any Major Credit Card OR Your PayPal Account\" title=\"PLEASE ALLOW POPUPS. CLICK to VIEW items in your cart. Safe & Secured Shopping! Pay with Any Major Credit Card OR Your PayPal Account\" >");
	document.writeln("<input type=\"hidden\" name=\"display\" value=\"1\">");
	document.writeln("</td>");
	document.writeln("</tr>");	
	document.writeln("<tr valign=top>");	
	document.writeln("<td valign=top align=center>");	
	document.writeln("<center><font size=1>(opens new window)</font></center>");	
	document.writeln("</td>");	
	document.writeln("</tr>");
	document.writeln("</table>");
	document.writeln("</form>");	
}

function LTrim(value) 
{
	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}

function CreateBuyButton(ItemNum, Title, Price, ShortDesc)
{

    var BuyButton = "";   

    t1 = Title;
    Title = LTrim(t1);

    t1 = ShortDesc;
    ShortDesc = LTrim(t1);

    BuyButton = BuyButton + "<form target=paypal action=https://www.paypal.com/cgi-bin/webscr method=post>";
    BuyButton = BuyButton + "<table cellpadding=0 cellspacing=0 border=0>";	
    BuyButton = BuyButton + "<tr valign=bottom>";	
    BuyButton = BuyButton + "<td valign=bottom align=center>";	
    BuyButton = BuyButton + "<input type=image src=http://www.fashionjewelryforeveryone.com/PayPalImages/buy_now.jpg width=\"120\" height=\"36\" border=0 name=submit alt=\"PLEASE ALLOW POPUPS. CLICK to BUY this item pay with Any Major Credit Card OR Your PayPal Account. Safe & Secured Shopping!\" title=\"PLEASE ALLOW POPUPS. CLICK to BUY this item pay with Any Major Credit Card OR Your PayPal Account. Safe & Secured Shopping!\">";

    BuyButton = BuyButton + "<input type=hidden name=add value=1>";

    BuyButton = BuyButton + "<input type=hidden name=cmd value=_cart>";

    BuyButton = BuyButton + "<input type=hidden name=business value=kohli290866@yahoo.com>";  

    BuyButton = BuyButton + "<input type=hidden name=item_number value=\"" + ItemNum + "\">";

    BuyButton = BuyButton + "<input type=hidden name=item_name value=\"" + ItemNum; 

    if (Title != "")

    {

        BuyButton = BuyButton + " (" + Title + ")";

    }  

    BuyButton = BuyButton + " " + ShortDesc + "\">";

    BuyButton = BuyButton + "<input type=hidden name=amount value=\"" + Price + "\">";

    BuyButton = BuyButton + "<input type=hidden name=no_shipping value=2>";

    BuyButton = BuyButton + "<input type=hidden name=return value=http://www.fashionjewelryforeveryone.com>";

    BuyButton = BuyButton + "<input type=hidden name=cancel_return value=http://www.fashionjewelryforeveryone.com>";

    BuyButton = BuyButton + "<input type=hidden name=no_note value=1>";

    BuyButton = BuyButton + "<input type=hidden name=currency_code value=USD>";
    BuyButton = BuyButton + "</td>";
    BuyButton = BuyButton + "</tr>";	
    BuyButton = BuyButton + "<tr valign=top>";	
    BuyButton = BuyButton + "<td valign=top align=center>";	
    BuyButton = BuyButton + "<center><font size=1>(opens new window)</font></center>";	
    BuyButton = BuyButton + "</td>";	
    BuyButton = BuyButton + "</tr>";
    BuyButton = BuyButton + "</table>";
    BuyButton = BuyButton + "</form>";

    return(BuyButton);

}

function ShowBorder(id)
{
        document.getElementById(id).className='DivStyle BorderOn';
}

function HideBorder(id)
{
        document.getElementById(id).className='DivStyle BorderOff';
}

function setBookmark(url, str)
{
	if (str=='')
	{
		str=url;
	}

	if (window.sidebar) // firefox
	{
		window.sidebar.addPanel(str, url, "");
	}
	else if (window.opera && window.print) // opera
	{ 
		var elem = document.createElement('a');
		elem.setAttribute('href', url);
		elem.setAttribute('title', str);
		elem.setAttribute('rel',' sidebar');
		elem.click();
	} 
	else if (document.all)
	{
		window.external.AddFavorite(url,str);
	}
	else 
	{
		alert('Press CTRL and D to add a bookmark to:\n"'+url+'".');
	}
} 
