//Kent Wong Photography 2007


//configure the bookmark us link
var bookmarkurl="http://wowit.ca/wong"
var bookmarktitle="Kent Wong Photography"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

//protect email addresses from harvesters
function getEmail(userName, hostName){
	var domain = ".ca"
	var atSign = "&#64";
	var address = userName + atSign + hostName + domain;
	document.write("<A " +  "HREF=" + "'MAIL" + "TO:" + address + "'>" + address +  "</A>"); 
}


/*-- google map  */
function load() {
if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	//405 Laurier Drive, Kamloops, BC
    map.setCenter(new GLatLng(50.63739999968652, -120.3504990000), 14);
	
// Create our "tiny" marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(40, 20);

map.addOverlay(new GMarker(map.getCenter(), icon));

	}
}
   
   
   
   var pullquote = { 
init : function() { 
// Check that the browser supports the methods used 
if (!document.getElementById || !document.createElement || !document.appendChild) return false; 
var oElement, oPullquote, oPullquoteP, oQuoteContent, i, j; 
// Find all span elements with a class name of pullquote 
var arrElements = document.getElementsByTagName('span'); 
var oRegExp = new RegExp("(^|\\s)pullquote(\\s|$)"); 
for (i = 0; i < arrElements.length; i++) { 
// Save the current element 
oElement = arrElements[i]; 
if (oRegExp.test(oElement.className)) { 
// Create the blockquote and p elements 
oPullquote = document.createElement('blockquote'); 
oPullquote.className = oElement.className; 
oPullquoteP = document.createElement('p'); 
// Insert the pullquote text 
for(j = 0; j < oElement.childNodes.length; j++) { 
oPullquoteP.appendChild( oElement.childNodes[j].cloneNode(true) ); 
} 
oPullquote.appendChild(oPullquoteP); 
// Insert the blockquote element before the span element's parent element 
oElement.parentNode.parentNode.insertBefore( oPullquote,oElement.parentNode ); 
} 
} 
} 
}; 
// addEvent function from http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html 
function addEvent(obj, type, fn) { 
if (obj.addEventListener) 
obj.addEventListener( type, fn, false ); 
else if (obj.attachEvent) 
{ 
obj["e"+type+fn] = fn; 
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } 
obj.attachEvent( "on"+type, obj[type+fn] ); 
} 
} 
addEvent(window, 'load',pullquote.init); 


function preloadImages()
{
if (document.images)
{
  pic1= new Image(6,589); 
  pic1.src="images/bg1.jpg"; 

  pic2= new Image(400,133); 
  pic2.src="images/LOGO_KWP_embossed.jpg";

  pic3= new Image(120,20);
  pic3.src="images/buttons/button_0.gif";

  pic4= new Image(120,20);
  pic4.src="images/buttons/button_1.gif";

  pic5= new Image(343,257); 
  pic5.src="images/kentwong_border.jpg"; 
  
  pic6= new Image(110,50);
  pic6.src="images/kent_t.gif";
  
  pic7= new Image(163,114);
  pic7.src="photos/03-191_5x7_joshjenn.jpg";
}
}