// JavaScript Document

<!-- function for popup window
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=620,height=450');");
}
// end of function

/* sets a label on the browser status
var dyear = new Date();
document.write(dyear.getYear());
window.defaultStatus="Copyright © 2005-"+dyear.getYear()+". Design4epage.Com. All Rights Reserved.";
// end of command parameter
*/

// this function is for bookmarking
var bookmarkurl="http://www.design4epage.com";
var bookmarktitle="Design4epage.Com - Quality Web Designs and Web Hosting Services for Small and Medium Businesses";
function addbookmark(){
	if (document.all);window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
// end of function

// swap images function
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->


/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function unsite01(page_not_avialable_01)
{
	alert ('Requested web address not found!, try again some other time ...' + page_not_avialable_01);
}

//--------------------------------------------- email encryptor
function AntiSpambotMailto(codelist, description, atagattr) {
	var thiscode, thischar;
	var CodeString = new String(codelist);
	var CodedArray = CodeString.split('|');
	var L = CodedArray.length;
	var AddrDecoded = "";
	for (var x=0; x < L; x++) {
		thiscode = CodedArray[x];
		thischar = String.fromCharCode( thiscode - L );
		AddrDecoded += thischar;
	}
	atagattr = atagattr ? ' ' + atagattr : '';
	if (!description) description = AddrDecoded; // if no description supplied, display email address
	var strOutput = '<a href="mailto:'+AddrDecoded+'" class=eml_link' + atagattr+'>' + description + '</a>';
	document.write(strOutput);
}
//--------------------------------------------- end of email encryptor 


//--------------------------------------------- disable mouse right button 
var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//--------------------------------------------- end of mouse right button

//------------------------------------ popup for view.php of edirectory ---------------------
  function newWindow (mypage,myname,w,h,features)
  {
  	if(screen.width)
  	{
  		var winl = (screen.width-w)/2;
  		var wint = (screen.height-h)/2;
  	}
  	else
  	{
  		winl = 0;wint =0;
  	}
  	if (winl < 0) winl = 0;
  	if (wint < 0) wint = 0;

  	var settings = 'height=' + h + ',';
  	settings += 'width=' + w + ',';
  	settings += 'top=' + wint + ',';
  	settings += 'left=' + winl + ',';
  	settings += features;
  	settings += ' scrollbars=yes ';
  	win = window.open(mypage,myname,settings);
  	win.window.focus();
  }

//------------------------------------ eo popup for view.php of edirectory ------------------