//================================================================================

function ShowEmail(user, domain, anchor) {
	var OutText = '';
	OutText += '<a href="mailto:' + user + '@' + domain + '">';
	if (anchor != '') OutText += anchor;
	else OutText += user + '@' + domain;
	OutText  += '</a>';
	document.write(OutText);
}

function ShowEmail2(user, domain, anchor, cc) {
	var OutText = '';
	OutText += '<a href="mailto:' + user + '@' + domain + '?cc=' + cc + '@' + domain + '">';
	if (anchor != '') OutText += anchor;
	else OutText += user + '@' + domain;
	OutText  += '</a>';
	document.write(OutText);
}


function externalLinks() { 

	if (!document.getElementsByTagName) return; 

	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		var relvalue = anchor.getAttribute("rel");

		if (anchor.getAttribute("href")) {
			var external = /external/;
			var relvalue = anchor.getAttribute("rel");
			if (external.test(relvalue)) { anchor.target = "_blank"; }
		} 
	}
} 


/*window.onload = function(){
    stripe('tableAlternate', '#fff', '#ede7d3');
    for(var i = 1; i<= 4; i++){
        stripe('table'+i, '#fff', '#ede7d3');
    }
    stripe('tableStriped', '#fff', '#ede7d3');
    for(var i = 1; i<= 4; i++){
        stripe('table'+i, '#fff', '#ede7d3');
    }
    
    if (!document.getElementsByTagName) return; 
 	var anchors = document.getElementsByTagName("a"); 
 	for (var i=0; i<anchors.length; i++) { 
   		var anchor = anchors[i]; 
   		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
     			anchor.target = "_blank"; 
	 } 
}*/

function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('ctl00_ContentPlaceHolder4_placeholder').src = whichpic.href;
  return false;
 } else {
  return true;
 }
}

function show_hide(strElem,true_false) {
    theElem = document.getElementById(strElem);
    if(!theElem) { return false }

    if(true_false) {
	    theElem.style.display = "";
    } else {
	    theElem.style.display = "none";
    }
}
	    
	    
function show_hide2(strElem,selectedValue) {
    theElem = document.getElementById(strElem);
    if(!theElem) { return false }

    if(selectedValue == "other")
	    theElem.style.display = "";
    else 
	    theElem.style.display = "none";
}
	    
//===============================================================================

function objectDump(obj) {
	var result = "<pre>";
	objName = this.name
	for (var i in obj) {
	  result += objName + "." + i + " = " + obj[i] + "\n";
	}
	return result + "</pre>"
}

function print_r(theObj) {

	function _print_r_(theObj) {

		var s = '';

		if(typeof(theObj) == "array" || typeof(theObj) == "object") {

			var sConstructor = Array === theObj.constructor? 'Array': 'Object';

		  s += sConstructor + "\n" + " ".repeat(this.level * 4) + "(";

			for(var p in theObj){

				s += "\n" + " ".repeat(this.level * 4) + "[" + p + "] => ";
				this.level++;
				s += _print_r_(theObj[p]);
				this.level--;
			}

			s += "\n" + " ".repeat(this.level * 4) + ")";

		} else {
		       s += theObj;
		}
		return s;
	}

	try {
		this.level = 1;
		if(arguments.length > 1 && arguments[1] == true) {
			return _print_r_(theObj);
		} else {
			alert(_print_r_(theObj))
			return true;
		}
	} catch(e) {
		alert(e.message)
		return false;
	}

}

function isFunction(a) {
    return typeof a == 'function';
}

function isNull(a) {
    return typeof a == 'object' && !a;
}

function isNumber(a) {
    return typeof a == 'number' && isFinite(a);
}

function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}

function isString(a) {
    return typeof a == 'string';
}

function isUndefined(a) {
    return typeof a == 'undefined';
}
	
/*function Menu(form)
{
	var result = (form.album.options[form.album.selectedIndex].value)  
	if(result != "null")
	  document.location.href=result
	else
	  form.album.options[0].selected = true;
}*/


PositionX = 100;
PositionY = 100;
defaultWidth  = 500;
defaultHeight = 500;
var AutoClose = true;
 
if (parseInt(navigator.appVersion.charAt(0))>=4) {
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle) {
	if (isNN){
		imgWin=window.open('about:blank','',optNN);
	}
	if (isIE){
		imgWin=window.open('about:blank','',optIE);
	}

	with (imgWin.document){

		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');
		writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');writeln('if (isIE){');
		writeln('window.resizeTo(100,100);');
		writeln('width=120-(document.body.clientWidth-document.images[0].width);');
		writeln('height=100-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');
		writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["cch"].width;');
		writeln('window.innerHeight=document.images["cch"].height;}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');

		if (!AutoClose) 
			writeln('</head><body bgcolor="000000" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		else 
			writeln('</head><body bgcolor="000000" scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');

		writeln('<img name="cch" src='+imageURL+' style="display:block"></body></html>');
		close();  
	}	
}



function initPage() {
	externalLinks();
	startit();
}

//window.onload = initPage; now uses slideshow_arxprnc.js -> startit();