function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger) {

alt=alt+"Gallery"
	if (bgcolor=="") {
		bgcolor="#000000";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

    if(w<740){
      var lift=0.90;
    }
    if(w>=740 & w<835){
      var lift=0.91;
    }
    if(w>=835){
      var lift=0.93;
    }

	if (imageWidth>w){
		byFactor = w / imageWidth;
		imageWidth = w;
		imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
		byFactor = h / imageHeight;
		imageWidth = (imageWidth * byFactor);
		imageHeight = h;
	}

	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
		imageHeight=imageHeight*lift;
		imageWidth=imageWidth*lift;
	}

	var posLeft=0
	var posTop=0

	if (hugger=="hug image") {
		posTop = (scrHeight-imageHeight)/2;
		posLeft = ((w-imageWidth)/2);
		scrHeight = imageHeight-adj;
		scrWidth = imageWidth-adj;
 	}

	imageHeight=imageHeight-adj;
	imageWidth=imageWidth-adj;

	newWindow = window.open("","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');
	newWindow.document.write('<center>');
	newWindow.document.write('<a href="javascript:self.close()"><img src='+imageName+' width='+imageWidth+' height='+imageHeight+' border=0 alt=\"Click\&nbsp\;Window\&nbsp\;To\&nbsp\;Close\" ></a>');
	newWindow.document.write('</center></body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function goSection() {
	var si = document.insite.choose.options.selectedIndex;
	var url = document.insite.choose.options[si].value;
	if(url != "") {
		var win = window.open(url,"main");
	}
}
var url = "http://www.alldido.co.uk";
var title = "All Dido"
function bookmark() {
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt (navigator.appVersion) >= 4))  {
	window.external.AddFavorite(url,title);
	}
}
var isLoaded=false;
months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

function getths(day) {
 if (day == 1 || day == 21 || day == 31)
   return 'st';
 else
   if (day == 2 || day == 22)
     return 'nd';
   if (day == 3 || day == 23)
     return 'rd';
   else return 'th';
}

function getRealYear(year)
{
  if (year < 1000)
  {
    year += 1900;
  }
  return year;
}

function dateString()
{
  d = new Date();
  year = getRealYear(d.getYear());
  day = getths(d.getDate())
  return ([d.getDate()] + day + " " + months[d.getMonth()] + " " + year);
}
var rotateMsg = true;
function MsgStatus() {
if(rotateMsg) {
window.status = '';
window.defaultStatus = 'All Dido - www.alldido.co.uk';
}
if(!rotateMsg) {
window.status = '';
window.defaultStatus = 'For all the latest Dido news and information';
}
setTimeout("MsgStatus();rotateMsg=!rotateMsg", 3000);
}
MsgStatus();