// JavaScript Document
<!-- Original:  Nebojsa Pajkic -->
<!-- Web Site:  http://justfreestuff.homepage.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var data = "0123456789";
var done = 1;
function statusIn(text) {
decrypt(text, 1, 1);
}

function statusOut() {
self.status = '';
done = 1;
}

function decrypt(text, max, delay) {
if (done) {
done = 0;
decrypt_helper(text, max, delay,  0, max);
   }
}
function decrypt_helper(text, runs_left, delay, charvar, max) {
if (!done) {
runs_left = runs_left - 1;
var status = text.substring(0, charvar);
for (var current_char = charvar; current_char < text.length; current_char++) {
status += data.charAt(Math.round(Math.random()*data.length));
}
window.status = status;
var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"
var new_char = charvar + 1;
var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"
if(runs_left > 0) {
setTimeout(rerun, delay);
}
else {
if (charvar < text.length) {
setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
}
else {
done = 1;
         }
      }
   }
}
//  End -->


var current = new Array();







var soundfile="http://www.blessedwithpomeranians.com/bark311.wav" //path to sound file, or pass in filename directly into playsound()

function playsound(soundfile){
if (document.all && document.getElementById){
document.getElementById("soundeffect").src="" //reset first in case of problems
document.getElementById("soundeffect").src=soundfile
}
}

function bindsound(tag, soundfile, masterElement){
if (!window.event) return
var source=event.srcElement
while (source!=masterElement && source.tagName!="HTML"){
if (source.tagName==tag.toUpperCase()){
playsound(soundfile)
break
}
source=source.parentElement
}
}






function nav(status){

//nav(Home1,boys2,girls3,kennel4,previous5,available6,testimonial7,comments8,contact9)

var pages = new Array("Home Page", "Our Boys", "Our Girls", "Kennel","Previous Dogs","For Sale","Testimonials","Comments","Contact Us");
var links = new Array("index.html", "boys.html", "girls.html", "Kennel.html","Preload.html","available1.html","Testimonials.html","Comments.html","Contact.html");
var word = new Array('Blessed with Pomeranians Kennel Home', 'Information and pictures of our boys', 'Information and pictures of our girls', 'How our kennel got started and why we do it','Fun pictures of previous dogs that have come through our home','Pictures and inforation on all of our available puppies','Testimonials that customers of ours have left for you to see','Leave us comments on how to improve our site','Contact us by phone or email');

var col = document.body.getAttribute("class");

document.write("<tr><bgsound src='#' id='soundeffect' loop=1 autostart='true' /><td rowspan='100' style='vertical-align:top;'><table width='100%' border=0><tr><td width='18%'>&nbsp;</td><td width='64%'><DIV class="+col+"1 style='PADDING-RIGHT: 10px; PADDING-LEFT: 10px; Z-INDEX: 1; PADDING-BOTTOM: 10px; WIDTH: 100%; PADDING-TOP: 10px;top:0;' onMouseover='bindsound(&quot;A&quot;, soundfile, this)'><P><CENTER>");

for(i=0;i<pages.length;i++){
	document.write("<TABLE style='WIDTH: 100%; HEIGHT: 46px' cellSpacing=5 cellPadding=5 border=1><Tbody><TR align=middle><TD ");
				   if(status.current[i]==1) 
				   document.write("class='current'>");
				   else if(status.current[i]==2)
				   document.write("><a href='../"+links[i]+"' onMouseOver=\"statusIn('"+word[i]+"');return true;\" onMouseOut=\"statusOut();\">");
				   else
				   document.write("><a href='"+links[i]+"' onMouseOver=\"statusIn('"+word[i]+"');return true;\" onMouseOut=\"statusOut();\">");
				   
	document.write(pages[i]+"</a></TD></TR></Tbody></TABLE>");
}
document.write("</DIV></td><td width='18%'>&nbsp;</td></tr></table></td>");























}

