function popupMyImage(url, name, features) 

{ 

//Launch a new window 

win = window.open(url,name,features); 

} 

 

function pop_window(url) {

 //remove a attribute if you don't want it to show up

  var popit = window.open(url,'console','menubar=no,toolbar=yes,location=no,directories=no,status=no,scrollbars=no,resizable=no,width=625,height=550');

 }

PositionX = 50;

PositionY = 50;

 

defaultWidth  = 600;

defaultHeight = 600;

 

 

var AutoClose = true;

 

// ================================

if (parseInt(navigator.appVersion.charAt(0))>=4){

var isNN=(navigator.appName=="Netscape")?1:0;

var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;

var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){

if (isNN){imgWin=window.open('about:blank','',optNN);}

if (isIE){imgWin=window.open('about:blank','',optIE);}

with (imgWin.document){

writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');

writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');

writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');

writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');

writeln('width=100-(document.body.clientWidth-document.images[0].width);');

writeln('height=100-(document.body.clientHeight-document.images[0].height);');

writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       

writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');

writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');

if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="yes" onload="reSizeToImage();doTitle();self.focus()">')

else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');

writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');

close();                 

}}

 

<!--

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}

 

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

 

function MM_findObj(n, d) { //v3.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;

}

 

function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

 

 

/* you absolutely, positively must change the value for dateType below to match your

   "Date Header Format" as set in your blog's Settings

   if your date format is:

   "Sunday, June 24, 2001" use 1

   "6/24/2001" use 2

   "6.24.2001" use 3

   "20010624" use 4

   "2001/06/24" use 5

   "2001-06-24" use 6

   "24.6.01" use 7

   "June 24, 2001" use 8

   "june 24, 2001" use 9

   something else, change to one of those and use the right number! */

 

dateType = "1";

 

tableFontStyle = "10px Verdana";

tableBackgroundStyle = "#eee";

tableBackgroundLinkStyle = "#ffff99";

// tableBorderStyle is the CSS style applied to the outside of the table, and around each cell

tableBorderStyle = "1px solid black";

// tableBorder is the ugly old HTML border attribute

tableBorder = "0";

 

/* change the lowMonthNames if you use a non-English language and you use one of the date styles

   with the month name in the date, but be sure they are in lower case (these are used for

   matching, not displaying */

 

lowMonthNames = new Array("january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december");

 

// you can change the displayMonthNames and displayWeekdayNames to anything that suits you

 

displayMonthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

displayWeekdayNames = new Array("Su", "Mo", "Tu", "We", "Th", "Fr", "Sa");

 

/* if you already do something with the body onload event (or want to later), add a call to

   it in this function or put the "if (inArchives) drawCalendar();" call in your existing

   onload function */

function doOnloadTasks(){

if (inArchives) drawCalendar();

}

 

// time to stop changing things, unless you are sure you know what you're doing!

links = new Array();

inArchives = false;

if (location.href.indexOf("<$BlogArchiveFileName$>") > -1) inArchives = true;

 

function datesplitter(date, datetype){

 switch(datetype){

  case "1" :

   date = date.substring(date.indexOf(",")+2);

   year = date.substring(date.length-4);

   day = date.substring(date.indexOf(" ")+1,date.indexOf(","));

   wordMonth = date.substring(0,date.indexOf(" "));

   wordMonth = wordMonth.toLowerCase();

   for (i = 0; i < 12; i++){

    if (lowMonthNames[i] == wordMonth){

     month = i;

     i = 12;

    }

   }

   break;

  case "2" :

   year = date.substring(date.length-4);

   month = date.substring(0,date.indexOf("/"))-1;

   day = date.substring(date.indexOf("/")+1,date.lastIndexOf("/"));

   break;

  case "3" :

   year = date.substring(date.length-4);

   month = date.substring(0,date.indexOf("."))-1;

   day = date.substring(date.indexOf(".")+1,date.lastIndexOf("."));

   break;

  case "4" :

   year = date.substring(0,4);

   month = date.substring(4,6);

   if (month.charAt(0) == "0") month = month.substring(1);

   month = month-1;

   day = date.substring(6);

   if (day.charAt(0) == "0") day = day.substring(1);

   break;

  case "5" :

   year = date.substring(0,4);

   month = date.substring(date.indexOf("/")+1,date.lastIndexOf("/"));

   if (month.charAt(0) == "0") month = month.substring(1);

   month = month-1;

   day = date.substring(date.lastIndexOf("/")+1);

   if (day.charAt(0) == "0") day = day.substring(1);

   break;

  case "6" :

   year = date.substring(0,4);

   month = date.substring(date.indexOf("-")+1,date.lastIndexOf("-"));

   if (month.charAt(0) == "0") month = month.substring(1);

   month = month-1;

   day = date.substring(date.lastIndexOf("-")+1);

   if (day.charAt(0) == "0") day = day.substring(1);

   break;

  case "7" :

   year = date.substring(date.length-2);

   if (year.charAt(0) == "0") year = year.charAt(1);

   year = parseInt(year);

   if (year < 50) year = 2000 + year; else year = 1900 + year;

   month = date.substring(date.indexOf(".")+1,date.lastIndexOf("."))-1;

   day = date.substring(0,date.indexOf("."));

   break;

  case "8" :

   year = date.substring(date.length-4);

   day = date.substring(date.indexOf(" ")+1,date.indexOf(","));

   wordMonth = date.substring(0,date.indexOf(" "));

   wordMonth = wordMonth.toLowerCase();

   for (i = 0; i < 12; i++){

    if (lowMonthNames[i] == wordMonth){

     month = i;

     i = 12;

    }

   }

   break;

  case "9" :

   year = date.substring(date.length-4);

   day = date.substring(date.indexOf(" ")+1,date.indexOf(","));

   wordMonth = date.substring(0,date.indexOf(" "));

   for (i = 0; i < 12; i++){

    if (lowMonthNames[i] == wordMonth){

     month = i;

     i = 12;

    }

   }

   break;

  default :

   year = 1980;

   month = 1;

   day = 1;

 }

oDate = new Date(year, month, day);

return oDate;

}

 

function countDays(date){

 // given a date object, return number of days in that month

 monthcount = new Array ("31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31");

 year = date.getFullYear();

 if (year % 4 == 0){

  if (year % 100 == 0){

   if (year % 400 == 0){

    monthcount[1]++;

    }

   }

  else {

   monthcount[1]++;

  }

 }

 return monthcount[date.getMonth()];

}

 

function drawCalendar(){

// only executes in a DOM compliant browser

if (document.getElementById){

if (document.createElement){

// IE is just barely compliant, if you use a deprecated style of attribute setting

navigator.appVersion.indexOf("MSIE") > 0 ? isIE = true : isIE = false;

 calStart = realDate;

 calStart.setDate(1);

 dayCount = countDays(calStart);

 leadblanks = calStart.getDay();

 oTable = document.createElement("TABLE");

 oTBody = document.createElement("TBODY");

 oRow = document.createElement("TR");

 oCell = document.createElement("TD");

 if (isIE)

  oCell.colSpan="7";

 else

  oCell.setAttribute("colspan", "7");

 oDateLabel = document.createTextNode(displayMonthNames[calStart.getMonth()] + " " + calStart.getFullYear());

 oCell.appendChild(oDateLabel);

 oRow.appendChild(oCell);

 oTBody.appendChild(oRow);

 oRow = document.createElement("TR");

 for (i=0;i<7;i++){

  oCell = document.createElement("TD");

  oCell.style.border = tableBorderStyle; 

  oDay = document.createTextNode(displayWeekdayNames[i]);

  oCell.appendChild(oDay);

  oRow.appendChild(oCell);

 }

 oTBody.appendChild(oRow);

 dayindex = 1;

 while (dayindex <= dayCount){

  oRow = document.createElement("TR");

  for (i=0;i<leadblanks;i++){

   oCell = document.createElement("TD");

   oCell.style.border = tableBorderStyle; 

   if (isIE)

    oSpace = document.createTextNode(" ");

   else

    {

     oSpace = document.createTextNode("*");

     oCell.style.color = tableBackgroundStyle;

    }

   oCell.appendChild(oSpace);

   oRow.appendChild(oCell);

   }

  for (b=leadblanks;b7;b++){

   oCell = document.createElement("TD");

   oCell.style.border = tableBorderStyle;

   if (links[dayindex] != null){

    oLink = document.createElement("A");

    if (isIE)

     oLink.href=links[dayindex];

    else

     oLink.setAttribute("href", links[dayindex]);

    oLinkText = document.createTextNode(dayindex);

    oLink.appendChild(oLinkText);

    oCell.appendChild(oLink);

    oCell.style.background = tableBackgroundLinkStyle;

    }

   else

    if (dayindex <= dayCount){

     oDayText = document.createTextNode(dayindex);

     oCell.appendChild(oDayText);

     }

    else {

     if (isIE)

      oSpace = document.createTextNode(" ");

     else

      {

       oSpace = document.createTextNode("*");

       oCell.style.color = tableBackgroundStyle;

      }

     oCell.appendChild(oSpace);

     }

   oRow.appendChild(oCell);

   oTBody.appendChild(oRow);

   dayindex++;

   }

   leadblanks = 0;

  }

oTBody.style.font = tableFontStyle;

oTBody.style.textAlign = "center"; 

oTable.appendChild(oTBody);

if (isIE)

 oTable.style.background = tableBackgroundStyle;

else

 oTable.setAttribute("bgColor", tableBackgroundStyle);

oTable.border = tableBorder;

oTable.style.border = tableBorderStyle;

calendarSpot = document.getElementById("CalendarHere");

calendarSpot.appendChild(oTable);

}

}

}


