/* Javascript Document 2008. All Right Reserved | Adult Web Site Design By http://bluedesignstudios.com */

var img_cache = new Object();

function parse_images() {
	if (document.getElementById) {
		var ar = document.getElementsByTagName('img');
		for( var x = 0; ar[x]; x++ ) {
			var im = ar[x];
			if(im.getAttribute) { 
				im.hoversrc = im.getAttribute('hoversrc');
			}
			if(im.hoversrc) {
				im.rootsrc = im.src;				
				im.onmouseout = function () {
				this.src = this.rootsrc;
				}
				if(!img_cache[im.hoversrc]) {
				img_cache[im.hoversrc] = new Image();
				img_cache[im.hoversrc].src = im.hoversrc;
				}
				im.onmouseover = function () {			
				this.src = this.hoversrc;			
				}
			}
		}
	}
}

function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}


function CreateBookmarkLink() { 
	title = "RollPlay Lounge";
	url = "http://www.rollplaylounge.com/"; 

	if( window.external && !window.sidebar ) { 
		// IE Favorite		
		window.external.AddFavorite( url, title); 
	}	else if(window.opera && window.print && !window.sidebar) { 
		// Opera Hotlist		
		return true; 
	}  else if (window.sidebar) { 
		// Mozilla Firefox Bookmark		
		window.sidebar.addPanel(title, url,"");
	} else { 
		alert("Sorry! Your browser doesn't support this function. Please bookmark this page manually.");
	}

}

function enlargeImage(img) {
	var largeImg = document.getElementsByName('largephoto')[0];
	
	if(img.getAttribute) { 
		img.hoversrc = img.getAttribute('hoversrc');
	}
	largephoto.src = img.hoversrc;
}

