var lastDisplayed = "";  // global used in JobPro marketing page to expand text
var lastDisplayed2 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed3 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed4 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed5 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed6 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed7 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed8 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed9 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed10 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed11 = "";  // global used in JobPro marketing page to expand text
var lastDisplayed12 = "";  // global used in JobPro marketing page to expand text


function show_details( elem )  {
	if ( lastDisplayed == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed = "";
	} else {
		if ( lastDisplayed != "" )  {
			document.getElementById( lastDisplayed ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed = elem;
	}
}


function show_details2( elem )  {
	if ( lastDisplayed2 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed2 = "";
	} else {
		if ( lastDisplayed2 != "" )  {
			document.getElementById( lastDisplayed2 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed2 = elem;
	}
}


function show_details3( elem )  {
	if ( lastDisplayed3 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed3 = "";
	} else {
		if ( lastDisplayed3 != "" )  {
			document.getElementById( lastDisplayed3 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed3 = elem;
	}
}


function show_details4( elem )  {
	if ( lastDisplayed4 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed4 = "";
	} else {
		if ( lastDisplayed4 != "" )  {
			document.getElementById( lastDisplayed4 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed4 = elem;
	}
}


function show_details5( elem )  {
	if ( lastDisplayed5 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed5 = "";
	} else {
		if ( lastDisplayed5 != "" )  {
			document.getElementById( lastDisplayed5 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed5 = elem;
	}
}


function show_details6( elem )  {
	if ( lastDisplayed6 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed6 = "";
	} else {
		if ( lastDisplayed6 != "" )  {
			document.getElementById( lastDisplayed6 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed6 = elem;
	}
}


function show_details7( elem )  {
	if ( lastDisplayed7 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed7 = "";
	} else {
		if ( lastDisplayed7 != "" )  {
			document.getElementById( lastDisplayed7 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed7 = elem;
	}
}


function show_details8( elem )  {
	if ( lastDisplayed8 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed8 = "";
	} else {
		if ( lastDisplayed8 != "" )  {
			document.getElementById( lastDisplayed8 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed8 = elem;
	}
}


function show_details9( elem )  {
	if ( lastDisplayed9 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed9 = "";
	} else {
		if ( lastDisplayed9 != "" )  {
			document.getElementById( lastDisplayed9 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed9 = elem;
	}
}


function show_details10( elem )  {
	if ( lastDisplayed10 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed10 = "";
	} else {
		if ( lastDisplayed10 != "" )  {
			document.getElementById( lastDisplayed10 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed10 = elem;
	}
}


function show_details11( elem )  {
	if ( lastDisplayed11 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed11 = "";
	} else {
		if ( lastDisplayed11 != "" )  {
			document.getElementById( lastDisplayed11 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed11 = elem;
	}
}


function show_details12( elem )  {
	if ( lastDisplayed12 == elem )  {
		document.getElementById( elem ).style.display = 'none';
		lastDisplayed12 = "";
	} else {
		if ( lastDisplayed12 != "" )  {
			document.getElementById( lastDisplayed12 ).style.display = 'none';
		}
		document.getElementById( elem ).style.display = 'block';
		lastDisplayed12 = elem;
	}
}



// ****** Stop all JavaScript Errors from reported by the browser ******

function stopError() {
//  return true;
}

window.onerror = stopError;


//////////////////// start determine screen size //////////////////
////////////////////////////////////////////////////////////////////

// for NN4/IE4
if (self.screen) {
        width = screen.width
        height = screen.height
}

// for NN3 w/Java
else if (self.java) {
       var javakit = java.awt.Toolkit.getDefaultToolkit();
       var scrsize = javakit.getScreenSize();
       width = scrsize.width;
       height = scrsize.height;
}
else {

// N2, E3, N3 w/o Java (Opera and WebTV)
width = height = '?'
}

if ( ( width < 1024 ) && ( height < 768 ) ) self.status='This site is best viewed at a screen resolution of 1024 X 768. Your resolution is set to ' + width +" X "+ height + ".";

//////////////////// end screen size //////////////////
////////////////////////////////////////////////////////////////////



///////// start ALTTXT - provides persisting mouseOver info ////////
////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ALTTXT V1.2
//  BY: BRIAN GOSSELIN OF SCRIPTASYLUM.COM
//  ADDED FADING EFFECT FOR IE4+ AND NS6+ ONLY AND OPTIMIZED THE CODE A BIT.
//  SCRIPT FEATURED ON DYNAMIC DRIVE (http://www.dynamicdrive.com)


var dofade=false;     // ENABLES FADE-IN EFFECT FOR IE4+ AND NS6 ONLY
var center=false;     // CENTERS THE BOX UNER THE MOUSE, OTHERWISE DISPLAYS BOX TO THE RIGHT OF THE MOUSE
var centertext=false; // CENTERS THE TEXT INSIDE THE BOX. YOU CAN'T SIMPLY DO THIS VIA STYLE BECAUSE OF NS4.
                     // OTHERWISE, TEXT IS LEFT-JUSTIFIED.


////////////////////////////// NO NEED TO EDIT BEYOND THIS POINT //////////////////////////////////////

var NS4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
var IE4 = (document.all && !document.getElementById)? true : false;
var IE5 = (document.getElementById && document.all)? true : false;
var NS6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var W3C = (document.getElementById)? true : false;
var w_y, w_x, client_login, boxheight, boxwidth;
var ishover=false;
var isloaded=false;
var ieop=0;
var op_id=0;

function getwindowdims(){
w_y=(NS4||NS6)? window.innerHeight : (IE5||IE4)? document.body.clientHeight : 0;
w_x=(NS4||NS6)? window.innerWidth : (IE5||IE4)? document.body.clientWidth : 0;
}

function getboxwidth(){
if(NS4)boxwidth=(client_login.document.width)? client_login.document.width : client_login.clip.width;
if(IE5||IE4)boxwidth=(client_login.style.pixelWidth)? client_login.style.pixelWidth : client_login.offsetWidth;
if(NS6)boxwidth=(client_login.style.width)? parseInt(client_login.style.width) : parseInt(client_login.offsetWidth);
}

function getboxheight(){
if(NS4)boxheight=(client_login.document.height)? client_login.document.height : client_login.clip.height;
if(IE4||IE5)boxheight=(client_login.style.pixelHeight)? client_login.style.pixelHeight : client_login.offsetHeight;
if(NS6)boxheight=parseInt(client_login.offsetHeight);
}

function moveclient_login(x,y){
if(NS4)client_login.moveTo(x,y);
if(W3C||IE4){
client_login.style.left=x+'px';
client_login.style.top=y+'px';
}}

function getpagescrolly(){
if(NS4||NS6)return window.pageYOffset;
if(IE5||IE4)return document.body.scrollTop;
}

function getpagescrollx(){
if(NS4||NS6)return window.pageXOffset;
if(IE5||IE4)return document.body.scrollLeft;
}

function writeindiv(text){
if(NS4){
client_login.document.open();
client_login.document.write(text);
client_login.document.close();
}
if(W3C||IE4)client_login.innerHTML=text;
}

//**** END UTILITY FUNCTIONS ****//

function writetxt(text){
if(isloaded){
if(text!=0){
ishover=true;
if(NS4)text='<div class="navtext">'+((centertext)?'<center>':'')+text+((centertext)?'</center>':'')+'</div>';
writeindiv(text);
getboxheight();
if((W3C || IE4) && dofade){
ieop=0;
incropacity();
}}else{
if(NS4)client_login.visibility="hide";
if(IE4||W3C){
if(dofade)clearTimeout(op_id);
client_login.style.visibility="hidden";
}
writeindiv('');
ishover=false;
}}}

function incropacity(){
if(ieop<=100){
ieop+=7;
if(IE4 || IE5)client_login.style.filter="alpha(opacity="+ieop+")";
if(NS6)client_login.style.MozOpacity=ieop/100;
op_id=setTimeout('incropacity()', 50);
}}

function moveobj(evt){
if(isloaded && ishover){
margin=(IE4||IE5)? 1 : 23;
if(NS6)if(document.height+27-window.innerHeight<0)margin=15;
if(NS4)if(document.height-window.innerHeight<0)margin=10;
//mx=(NS4||NS6)? evt.pageX : (IE5||IE4)? event.clientX : 0;
//my=(NS4||NS6)? evt.pageY : (IE5||IE4)? event.clientY : 0;
if (NS4){
mx=evt.pageX
my=evt.pageY
}
else if (NS6){
mx=evt.clientX
my=evt.clientY
}
else if (IE5){
mx=event.clientX
my=event.clientY
}
else if (IE4){
mx=0
my=0
}

if(NS4){
mx-=getpagescrollx();
my-=getpagescrolly();
}
xoff=(center)? mx-boxwidth/2 : mx+5;
yoff=(my+boxheight+30-getpagescrolly()+margin>=w_y)? -15-boxheight: 30;
moveclient_login( Math.min(w_x-boxwidth-margin , Math.max(2,xoff))+getpagescrollx() , my+yoff+getpagescrolly());
if(NS4)client_login.visibility="show";
if(W3C||IE4)client_login.style.visibility="visible";
}}

if(NS4)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=moveobj;
window.onload=function(){
  client_login=(NS4)? document.layers['client_login'] : (IE4)? document.all['client_login'] : (W3C)? document.getElementById('client_login') : null;
  getboxwidth();
  getboxheight();
  getwindowdims();
  isloaded=true;
  if((W3C || IE4) && centertext)client_login.style.textAlign="center";
  if(W3C)client_login.style.padding='4px';
  if(IE4 || IE5 && dofade)client_login.style.filter="alpha(opacity=0)";
  }
window.onresize=getwindowdims;

///////// end ALTTXT ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////


///////// start openWin - open window upon mouseOver - unused ///////
////////////////////////////////////////////////////////////////////

function openWin( windowURL, windowName, windowFeatures ) 
{
	return window.open( windowURL, windowName, windowFeatures ) ;
}

// example usage:
// <a href="javascript:void()" onMouseOver="JavaScript: newWindow = openWin( 'abbreviation_key.html', 'POPUP', 'width=442,height=500,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1,screenX=0,left=100,screenY=0,top=50' ); newWindow.focus()""  "" onClick=";return false">XXX</a>

///////// end openWin //////////////////////////////////////////////
////////////////////////////////////////////////////////////////////



///////// open various popup windows ///////////////////////////////
////////////////////////////////////////////////////////////////////

function open_data_loss_chart()
{
  var popurl="showdata_loss_chart.html"
  winpops=window.open(popurl,"","width=390,height=447,left=20,top=20")
}

function download_jobpro()
{
  var popurl="showjobpro_download.html"
  winpops=window.open(popurl,"","width=390,height=300,left=150,top=150")
}

function openfiltrum()
{
  var popurl="showfiltrum.html"
  winpops=window.open(popurl,"","width=910,height=558,left=20,top=20,scrollbars=yes")
}


function openshowcardnetdotnet()
{
  var popurl="showcardnetdotnet.html"
  winpops=window.open(popurl,"","width=800,height=680,left=20,top=20,scrollbars=yes")
}
  

function openshowecm()
{
  var popurl="showecm.html"
  winpops=window.open(popurl,"","width=800,height=680,left=20,top=20,scrollbars=yes")
}


///////// start generic mouseover - very useful but unused //////////
////////////////////////////////////////////////////////////////////

    if (document.images)
    {
        // Create Active images
        LearnMoreon = new Image();
        LearnMoreon.src = "images/LearnMoreActive.gif";

        LearnMoreoff = new Image();
        LearnMoreoff.src = "images/LearnMore.gif";
    }


//Activate Images
function imgOn(imgName)
    {
        if (document.images)
        {
            document[imgName].src = eval(imgName + "on.src");
        }
    }


//Deactivate Images
function imgOff(imgName) {
    if (document.images) {
    document[imgName].src = eval(imgName + "off.src");
    }
}

// Example usage:

//    <table width=100% cellpadding=0 cellspacing=0 border=0>
//    <tr><td align=left><a href="more.html" onMouseOver= "imgOn('LearnMore'); //self.status='Learn More'; return true" onMouseOut= "imgOff('LearnMore'); self.status=' '; //return true">
//    <img name="LearnMore" src="images/LearnMore.gif" width=88 height=18 alt="Learn More" //border="0"></a></td></tr>
//    </table>

///////// end generic mouseover - very useful //////////
////////////////////////////////////////////////////////



///////// start detect right and left mouse buttons - and write to status bar ////
/////////////////////////////////////////////////////////////////////////////////

/////////////////////////////// detect left mouse button

function mouseDown(e) {
 if (parseInt(navigator.appVersion)>3) {
  var clickType=1;
  if (navigator.appName=="Netscape") clickType=e.which;
  else clickType=event.button;
  if (clickType==1) self.status='Contact DataCentrik Solutions today at 778 834-9424 or email info@datacentrik.com.';
  if (clickType!=1) self.status='Learn why more companies are choosing DataCentrik Solutions as their primary IT solutions provider.';
 }
 return true;
}
if (parseInt(navigator.appVersion)>3) {
 document.onmousedown = mouseDown;
 if (navigator.appName=="Netscape")
  document.captureEvents(Event.MOUSEDOWN);
}


/////////////////////////////// detect right mouse button

//function right(e){if(navigator.appName=='Netscape'&&(e.which==3||e.which==2))
//return false;else if(navigator.appName=='Microsoft Internet Explorer'&&(event.button==2||event.button==3)){alert(" Copyright © 2003 DataCentrik Solutions");return false;}return true;}document.onmousedown=right;if(document.layers)window.captureEvents(Event.MOUSEDOWN);window.onmousedown=right;

///////// end detect right and left mouse buttons ////
////////////////////////////////////////////////////////



///////// start go - provide minimal security ///////////////////////
////////////////////////////////////////////////////////////////////

function go()
{
        var user = document.form.user.value;
        var pass = document.form.pass.value;
        if ( user == "" || pass == "" )
        {
            alert("Please enter both Username and Password"); // Put your own message here
        }
        else
        {
            isfound=false;
            okpass=""
        for (i = 0; i < look.length; i++)
        {
        if (user==look[i][0])
                {
                    okpass=look[i][1];
                    isfound=true;
                break;
                }
        }
        if (okpass=="")
        {
            alert("Invalid Username or Password!"); // Put your own message here
        }
        else
        {
        if (!isfound)
        {
                    alert("Invalid Username or Password!"); // Put your own message here
                }
                else
                {
                    if (okpass != pass)
                        {
                            alert("Invalid Username or Password!"); // Put your own message here
                        }
                        else
                            {
                                location = user.toLowerCase() + "_" + pass.toLowerCase()                   + ".html";
                            }
                        }
                }
        }
}

look=new Array(new Array("client","login"),
new Array("client","login"));

///////// end go ///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////


///////// start download - provide minimal security ///////////////////////
////////////////////////////////////////////////////////////////////

function goDownload()
{
        var user = document.form.user.value;
        var pass = document.form.pass.value;
        if ( user == "" || pass == "" )
        {
            alert("Please enter both Username and Password"); // Put your own message here
        }
        else
        {
            isfound=false;
            okpass=""
        for (i = 0; i < downloadJobPro.length; i++)
        {
        if (user==downloadJobPro[i][0])
                {
                    okpass=downloadJobPro[i][1];
                    isfound=true;
                break;
                }
        }
        if (okpass=="")
        {
            alert("Invalid Username or Password!"); // Put your own message here
        }
        else
        {
        if (!isfound)
        {
                    alert("Invalid Username or Password!"); // Put your own message here
                }
                else
                {
                    if (okpass != pass)
                        {
                            alert("Invalid Username or Password!"); // Put your own message here
                        }
                        else
                            {
                                location = user.toLowerCase() + "_" + pass.toLowerCase()                   + ".html";
                            }
                        }
                }
        }
}

downloadJobPro=new Array(new Array("jobpro","download"),
new Array("jobpro","download"));

///////// end download ///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////





//////////////////////////// start showDate() - used on every page
//////////////////////////////////////////////////////////////////

var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";

var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();

if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
        year="19" + year;
if (navigator.appName == "Netscape")
        year=1900 + year;
        
function showDate() {
        document.write(lmonth + " ");
        document.write(date + ", " + year);
        document.close();
}

///	<SCRIPT LANGUAGE="JAVASCRIPT">showDate()</SCRIPT> to invoke       

//////////////////////////// end showDate() //////////////////////
//////////////////////////////////////////////////////////////////


///////////////////////////// start showLastUpdated - unused /////
//////////////////////////////////////////////////////////////////

function showLastUpdated() {
	document.write("last updated " + document.lastModified);
}	

///////////////////////////// end showLastUpdated ////////////////
//////////////////////////////////////////////////////////////////



///////////////////////////// start chooseStyle - unused /////////
//////////////////////////////////////////////////////////////////

function chooseStyle() { 
	//Give NS4.7 and below a different stylesheet

	if ((navigator.appName.indexOf("Netscape") != -1) 
		&& (parseInt(navigator.appVersion) < 5)) {
		document.write('<link rel="stylesheet" type="text/css" href="/stylesheetNS.css">');
	} else {
		document.write('<link rel="stylesheet" type="text/css" href="/stylesheet.css">');
	}
}

///////////////////////////// end chooseStyle ////////////////////
//////////////////////////////////////////////////////////////////



///////////////////////////// start clearDefault - clear SearchBox
//////////////////////////////////////////////////////////////////

function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
	// If Dynamic Style is supported, clear the style
	if (el.style) el.style.cssText = ""
}

///////////////////////////// end clearDefault ///////////////////
//////////////////////////////////////////////////////////////////



///////////////////////////// start searchSite ///////////////////
//////////////////////////////////////////////////////////////////

function searchSite(form) { 

  var SearchTerm = form.SearchBox.value;
  
  if ( (SearchTerm.length < 4) || (SearchTerm == "Enter Search Terms") ) { 
  
 // alert("SearchTerm length = " + SearchTerm.length);
  
  form.SearchBox.value = "Enter Search Terms"; return null;}
  
  
  // following width and height values ignored by window.open() ##########
  //var popurl="http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=site:www%2Edatacentrik%2Ecom " + SearchTerm;
  var popurl="http://www.google.com/search?q=site:www.datacentrik.com " + SearchTerm;

  winpops=window.open(popurl,"","width=width,height=height,left=20,top=20,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes")
  
}

///////////////////////////// end searchSite /////////////////////
//////////////////////////////////////////////////////////////////
