function OpenWebCam() 
{
open("live.asp" , "OpenWebCam" , "toolbar=no,width=320,height=240"); 
}
function OpenWebCam2() 
{
open("live.asp" , "OpenWebCam2" , "toolbar=no,width=320,height=240"); 
}
function OpenColor() 
{
open("color.html" , "OpenColor" , "toolbar=no,width=613,height=376"); 
}
function OpenLinks() 
{
open("links.asp" , "OpenLinks" , "toolbar=no,width=200,height=600"); 
}
function OpenAbout() 
{
open("about.asp" , "OpenAbout" , "toolbar=no,width=600,height=200"); 
}
function OpenContact()
{
open("contact.html" , "OpenContact" , "toolbar=no,width=300,height=300");
}
function OpenPortfolio()
{
open("portfolio.html" , "OpenPortfolio" , "scrollbars=yes,width=350,height=460");
}
function OpenPhoto()
{
open("foto.html" , "OpenPhoto" , "scrollbars=no,width=640,height=460");
}

function displayWindow(theURL,winName,width,height,features) {
var window_width = width;
var window_height = height;
var newfeatures= features;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open
(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');

newWindow.focus();
}


// rightclick menu

var menuskin = "skin1"; 
var display_url = 1; 
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
   }
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
   }
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
   }
}

// Title script

if (document.all||document.getElementById){
var thetitle=document.title
document.title=''
}


var data="####################################";

var done=1;
function statusIn(text){
	decrypt(text,2,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));
		}
	document.title = 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;
			}
		}
	}
}

if (document.all||document.getElementById)
statusIn(thetitle)

// Jahrl.com bookmark

var bookmarkurl="http://www.jahrl.com"
var bookmarktitle="Jahrls homepage"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


