
var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
	onhover:{on:'onmouseover', off:'onmouseout'},
	onactive:{on:'onmousedown', off:'onmouseup'}
}

function parseStylesheets() {
	if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
	window.attachEvent('onunload', unhookHoverEvents);
	var sheets = doc.styleSheets, l = sheets.length;
	for(var i=0; i<l; i++) 
		parseStylesheet(sheets[i]);
}
	function parseStylesheet(sheet) {
		if(sheet.imports) {
			try {
				var imports = sheet.imports, l = imports.length;
				for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
			} catch(securityException){}
		}

		try {
			var rules = (currentSheet = sheet).rules, l = rules.length;
			for(var j=0; j<l; j++) parseCSSRule(rules[j]);
		} catch(securityException){}
	}

	function parseCSSRule(rule) {
		var select = rule.selectorText, style = rule.style.cssText;
		if(!csshoverReg.test(select) || !style) return;

		var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
		var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
		var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
		var affected = select.replace(/:(hover|active).*$/, '');
		var elements = getElementsBySelect(affected);
		if(elements.length == 0) return;

		currentSheet.addRule(newSelect, style);
		for(var i=0; i<elements.length; i++)
			new HoverElement(elements[i], className, activators[pseudo]);
	}

function HoverElement(node, className, events) {
	if(!node.hovers) node.hovers = {};
	if(node.hovers[className]) return;
	node.hovers[className] = true;
	hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
	hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
	function hookHoverEvent(node, type, handler) {
		node.attachEvent(type, handler);
		hoverEvents[hoverEvents.length] = { 
			node:node, type:type, handler:handler 
		};
	}

	function unhookHoverEvents() {
		for(var e,i=0; i<hoverEvents.length; i++) {
			e = hoverEvents[i]; 
			e.node.detachEvent(e.type, e.handler);
		}
	}

function getElementsBySelect(rule) {
	var parts, nodes = [doc];
	parts = rule.split(' ');
	for(var i=0; i<parts.length; i++) {
		nodes = getSelectedNodes(parts[i], nodes);
	}	return nodes;
}
	function getSelectedNodes(select, elements) {
		var result, node, nodes = [];
		var identify = (/\#([a-z0-9_-]+)/i).exec(select);
		if(identify) {
			var element = doc.getElementById(identify[1]);
			return element? [element]:nodes;
		}
		
		var classname = (/\.([a-z0-9_-]+)/i).exec(select);
		var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
		var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
		for(var i=0; i<elements.length; i++) {
			result = tagName? elements[i].all.tags(tagName):elements[i].all; 
			for(var j=0; j<result.length; j++) {
				node = result[j];
				if(classReg && !classReg.test(node.className)) continue;
				nodes[nodes.length] = node;
			}
		}	
		
		return nodes;
	}


document.write('<div id="header"><a href="http://kirasoasis.com/index.html"><img src="../images/site/kira.jpg" alt="kira with candle" class="headerimage" border="0"/><br /><img src="../images/site/logo.gif" alt="Kira\'s Oasis" border="0" /></a>');
document.write('<p>The art of Bellydance has been passed from mother to daughter and woman to woman for a thousand generations, and is a wonderful activity for developing fitness, grace, sense of timing and self-esteem.</p>');
document.write('<div class="searchbox">');
document.write('<FORM method=GET action="http://www.google.com/search"><div align="left"><input type=hidden name=ie value=UTF-8><input type=hidden name=oe value=UTF-8></div>');
document.write('<INPUT TYPE=text name=q size=25 maxlength=255 value=""><INPUT type=submit name=btnG VALUE="Search">');
document.write('<input type=hidden name=domains value="http://www.kirasoasis.com"><br><input type=radio name=sitesearch value=""> WWW <input type=radio name=sitesearch value="http://www.kirasoasis.com" checked> Kira\'s Oasis');
document.write('</FORM>');
document.write('</div>');
document.write('</div>');
document.write('<div id="nav">');
document.write('<div id="menu">');
document.write('<ul>');
document.write('<li><a href="/index.html">Home</a></li>');
document.write('<li><a class="menuimg" style="border-bottom:1px solid #9ad5a5;" href="/aboutOasis/index.html">About the Oasis</a>');
document.write('<ul>');
document.write('<li><a href="/aboutOasis/boutique.html">Oasis Boutique</a></li>');
document.write('<li><a href="/aboutOasis/tour.html">Tour the Oasis</a></li>');
document.write('<li><a href="/aboutOasis/teach.html">Teach at the Oasis</a></li>');
document.write('<li><a href="/aboutOasis/rent.html">Hall Rental</a></li>');
document.write('<li><a href="/pdf/membership.pdf">Membership Form <img src="/images/site/page_white_acrobat.png" alt="PDF" class="inline" /></a></li>');
document.write('<li><a href="/aboutOasis/directions.html">Directions and Maps</a></li>');
document.write('<li><a href="/aboutOasis/testimonials.html">Testimonials</a></li>');
document.write('<li><a href="/aboutOasis/links.html">Useful Links</a></li>');
document.write('</ul>');
document.write('</li>');
document.write('<li><a href="http://www.kirasoasis.com/cal/ko.htm">Oasis Calendar</a></li>');
document.write('<li><a class="menuimg" style="border-bottom:1px solid #9ad5a5;" href="/aboutKira/index.html">About Kira</a>');
document.write('<ul>');
document.write('<li><a href="/aboutKira/index.html">About Kira</a></li>');
document.write('<li><a href="/aboutKira/kiraclasses.html">Kira\'s Classes</a></li>');
document.write('<li><a href="http://kirasoasis.com/gallery/kira/index.html">Kira\'s Photos</a></li>');
document.write('<li><a href="/aboutKira/video.html">Videos</a></li>');
document.write('</ul>');
document.write('</li>');
document.write('<li><a href="/classes/bdclasses.html">Bellydance Classes</a></li>');
document.write('<li><a href="/classes/latinclasses.html">Latin Dance Classes</a></li>');
document.write('<li><a href="/classes/yogaclasses.html">Yoga Classes</a></li>');
document.write('<li><a href="/classes/zumbaclasses.html">Zumba Classes</a></li>');
document.write('<li><a href="/events/workshops.html">Specialty Workshops</a></li>');
document.write('<li><a class="menuimg" style="border-bottom:1px solid #9ad5a5;" href="/classes/adultclasses.html">Adult 18+ Classes</a>');
document.write('<ul>');
document.write('<li><a href="/classes/poleclasses.html">Pole Classes</a></li>');
document.write('<li><a href="/events/vip8.html">VIP8 Burlesque Show</a></li>');
document.write('</ul>');
document.write('</li>');
document.write('<li><a href="/events/events.html">Events at the Oasis <br />and Elsewhere</a></li>');
document.write('<li><a class="menuimg" style="border-bottom:1px solid #9ad5a5;" href="/events/index.html">Monthly Dance Nights</a>');
document.write('<ul>');
document.write('<li><a href="/events/bd_night.html">Bellydance Nite</a></li>');
document.write('<li><a href="/events/latin_night.html">Latin Dance Nite</a></li>');
document.write('<li><a href="/events/swing_night.html">Swing Dance Nite</a></li>');
document.write('</ul>');
document.write('</li>');
document.write('<li><a href="/events/fundraisers.html">Fundraisers</a>');
document.write('</li>');
document.write('<li><a href="/photogalleries.html">Photo Galleries</a> </li>');
document.write('<li><a href="/newsletter.html">Newsletter</a></li>');
document.write('<li><a href="/aboutOasis/contact.html">Contact the Oasis</a></li>');
document.write('</ul>');
document.write('</div>');
document.write('</div>');