
////////////////////////////////////////
// Functions Needed to Show Current Date
function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function showdate (){
var months=new Array(8);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=y2k(time.getYear());
document.write(lmonth +" "+ date +", "+ year);
}

function showcopyright (cstartyear) {
var dnow=new Date();
var dyear=y2k(dnow.getYear());
document.write("Copyright "+ cstartyear +"-"+ dyear + " All Rights Reserved");
}
// End of Date Functions
///////////////////////////////////////////////////

//////////////////////////////////////////////
// Function to show random customer quotes
function showquote() {
var ar = new Array(
	"Order was sent much quicker than expected. I will shop there again",
	"The ordering system was user friendly & a great time saver. Shipping was worry free",
	"Good price and fast shipping - I would order here again",
	"Service and delivery was great! I'd recommend to anyone needing laptop supplies.",
	"ShopLaptop was very responsive to my email query to help me clarify my order, and the delivery was flawless",
	"I was extremely happy with my purchase and it arrived at my house very quickly.",
	"They did a great job of making contact, delivering the correct part, and delivering it quickly.",
	"These guys are great - best prices, great service.",
	"Package arrived quickly and worked great",
	"Best price and received quickly!",
	"Excellent Service on the phone. Excellent Prices.",
	"I found items here that were Half the price they were anywhere else.");
var num = Math.floor(Math.random() * ar.length);
document.write("&quot;");
document.write(ar[num]);
document.write("&quot;");
}
// End Quotes
//////////////////////////////////////////////

/////////////////////////////////////
// Basic Cookie Functions
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}
function y_svi (xcode) {
	aok=getCookie('y_svi');
	if (aok!=null && aok!=""){
		xcode = xcode.substr(10,xcode.length-20); 
		var outstr = "";
		for (i = 0; i < xcode.length; i=i+2)
		{
			outstr = outstr + "%" + xcode.substr(i,2);
		}
		document.write(decodeURI(outstr));
	} else {
		
	}
}
// End of Cookie Functions
/////////////////////////////////////////
