var win = null;
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	
function shippingDate(mypage,w,h){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable'
	win = window.open(mypage,'',settings);
}


function addDate(ds,v) {
	var n;
	var d=ds;
	var n=d.getDate();
	var day=d.getDay();
	if (day==6) {rem=1} else {rem=((v+day)-((v+day) % 7))* 2/7;};
	//creating new date and return it 
	d1=new Date();
	d1.setYear(d.getYear());
	d1.setMonth(d.getMonth());
	d1.setDate(n+v+rem);
	var tempd=d1.getDay();
	var tempv=0;
	if (tempd==0) tempv=6;
	if (tempd==6) tempv=5;
	if (tempv>=5){
		d1.setDate(d1.getDate()+(7-tempv));
	}
	return (d1);
}

function showDate(num) {
	var d=addDate(new Date(),num);
	document.write( montharray[d.getMonth()] + " " + d.getDate() );
}