// JavaScript Document
// Navbar
startList = function navbar() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.nodeName=="LI") {
  node.onmouseover=function navbar() {
  this.className+=" over";
    }
  node.onmouseout=function navbar() {
  this.className=this.className.replace
      (" over", "");
   }
   }
  }
 }
}
window.onload=startList;
//reloads the window if Nav4 resized
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// Add to Favourites
function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}
// Popup
shown=''
function OpenHelp(url) {
if( shown=='' || shown.closed) {
	shown=window.open(url,'OpenFile','scrollbars=no,status=no,width=360,height=300');
}
else{ 
	shown.close();
	shown=window.open(url,'OpenFile','scrollbars=no,status=no,width=360,height=300');
}
}
function OpenFlash(url) {
if( shown=='' || shown.closed) {
	shown=window.open(url,'OpenFile','scrollbars=no,status=no,width=800,height=560');
}
else{ 
	shown.close();
	shown=window.open(url,'OpenFile','scrollbars=no,status=no,width=800,height=560');
}
}
//Close Popup
function clickclose ()
{
close();
}
//date
function  displaydate() {
DaysofWeek = new Array()
DaysofWeek[0]="Sunday"
DaysofWeek[1]="Monday"
DaysofWeek[2]="Tuesday"
DaysofWeek[3]="Wednesday"
DaysofWeek[4]="Thursday"
DaysofWeek[5]="Friday"
DaysofWeek[6]="Saturday"
Months = new Array()
Months[0]="January"
Months[1]="February"
Months[2]="March"
Months[3]="April"
Months[4]="May"
Months[5]="June"
Months[6]="July"
Months[7]="August"
Months[8]="September"
Months[9]="October"
Months[10]="November"
Months[11]="December"
RightNow = new Date()
var day = DaysofWeek[RightNow.getDay()]
var date = RightNow.getDate()
var Month = Months[RightNow.getMonth()]
var Year = RightNow.getFullYear()
if (date == 1 || date == 21 || date == 31)
{ender = "<SUP>st</SUP>"}
else
if (date == 2 || date == 22)
{ender = "<SUP>nd</SUP>"}
else
if (date == 3 || date == 23)
{ender = "<SUP>rd</SUP>"}
else
{ender = "<SUP>th</SUP>"}
document.write(day+ " " +date+ ender+ " " +Month+ " " +Year)
}
//Login Form
function Login(form) {
var domain_name = form.domain_name.value;
var username = form.username.value;
var password = form.password.value;
var port = form.port.value;
letters = "A-Z,a-z,1234567890_-";

encrypt = new Array(
"%61","%62","%63","%64","%65","%66",
"%67","%68","%69","%6a","%6b","%6c",
"%6d","%6e","%6f","%70","%71","%72",
"%73","%74","%75","%76","%77","%78",
"%79","%7a","/","."
,"%31","%32","%33","%34","%35","%36","%37","%38",
"%39","%30","~","_","!",":");
var input = password;
encpass = "";
for(var count = 0; count < input.length; count++) {
daChar = input.charAt(count);
for (i = 0; i < letters.length; i++) {
if (daChar == letters.charAt(i)) {
encpass += encrypt[i];
break;
}
}
}
if (domain_name == "" && username == "" && password == "" && port == "") {
alert("Adept Hosting UK\n\nYou left the login form blank.  Please enter the following information:\n\n1. Domain name \(do not include \'www.\'\)\n2. User name\n3. Password\n\nRemember to select whether you are an Adept Hosting UK Reseller or\nShared Hosting Customer.\n\nThank you,\nAdept Hosting UK Support\nsupport@adepthosting.co.uk");
login.username.focus();
return false; 
}
if (domain_name == "") {
alert("Adept Hosting UK\n\nPlease enter your domain name\n\nExample:  .");
login.username.focus();
return false; 
}
if (username == "") {
alert("Adept Hosting UK\n\nPlease enter your username.");
login.username.focus();
return false; 
}
if (password == "") {
alert("Adept Hosting UK\n\nPlease enter your password.");
login.password.focus();
return false; 
}
if (port == "") {
alert("Adept Hosting UK\n\nPlease select yes or no if you are a reseller.");
login.password.focus();
return false; 
}
else {
var whmcpanel_login = "http://" + username + ":" + password + "@www." + domain_name + "/" + port;
//  uncomment the next line to load customer's WHM or CPanel session in the same window
//  window.location.href = whmcpanel_login;
  var url = whmcpanel_login
  if (url != "") open(url, 
  "adepthosting_wmhcpanel","width=780,height=540,copyhistory=no,location=yes,toolbar=yes,scrollbars=yes,resizable=yes,statusbar=yes,status=yes,menubar=yes,top=5,left=5");

  return false;
}
}
<!--
function  _CF_checkCFForm_1(_CF_this) {
    return true;
    }
//-->

<!--
google_ad_client = "pub-6405826776314497";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000099";
google_color_url = "999999";
google_color_text = "666666";
//-->


//** Featured Content Slider script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: Oct 28th, 06

////Ajax related settings
var csbustcachevar=0 //bust potential caching of external pages after initial Ajax request? (1=yes, 0=no)
var csloadstatustext="<img src='loading.gif' /> Requesting content..." //HTML to indicate Ajax page is being fetched
var csexternalfiles=[] //External .css or .js files to load to style the external content(s), if any. Separate multiple files with comma ie: ["cat.css", dog.js"]

////NO NEED TO EDIT BELOW////////////////////////
var enablepersist=true
var slidernodes=new Object() //Object array to store references to each content slider's DIV containers (<div class="contentdiv">)
var csloadedobjects="" //Variable to store file names of .js/.css files already loaded (if Ajax is used)

function ContentSlider(sliderid, autorun){
var slider=document.getElementById(sliderid)
slidernodes[sliderid]=[] //Array to store references to this content slider's DIV containers (<div class="contentdiv">)
ContentSlider.loadobjects(csexternalfiles) //Load external .js and .css files, if any
var alldivs=slider.getElementsByTagName("div")
for (var i=0; i<alldivs.length; i++){
if (alldivs[i].className=="contentdiv"){
slidernodes[sliderid].push(alldivs[i]) //add this DIV reference to array
if (typeof alldivs[i].getAttribute("rel")=="string") //If get this DIV's content via Ajax (rel attr contains path to external page)
ContentSlider.ajaxpage(alldivs[i].getAttribute("rel"), alldivs[i])
}
}
ContentSlider.buildpagination(sliderid)
var loadfirstcontent=true
if (enablepersist && getCookie(sliderid)!=""){ //if enablepersist is true and cookie contains corresponding value for slider
var cookieval=getCookie(sliderid).split(":") //process cookie value ([sliderid, int_pagenumber (div content to jump to)]
if (document.getElementById(cookieval[0])!=null && typeof slidernodes[sliderid][cookieval[1]]!="undefined"){ //check cookie value for validity
ContentSlider.turnpage(cookieval[0], parseInt(cookieval[1])) //restore content slider's last shown DIV
loadfirstcontent=false
}
}
if (loadfirstcontent==true) //if enablepersist is false, or cookie value doesn't contain valid value for some reason (ie: user modified the structure of the HTML)
ContentSlider.turnpage(sliderid, 0) //Display first DIV within slider
if (typeof autorun=="number" && autorun>0) //if autorun parameter (int_miliseconds) is defined, fire auto run sequence
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorun)}, autorun)
}

ContentSlider.buildpagination=function(sliderid){
var paginatediv=document.getElementById("paginate-"+sliderid) //reference corresponding pagination DIV for slider
var pcontent=""
for (var i=0; i<slidernodes[sliderid].length; i++) //For each DIV within slider, generate a pagination link
pcontent+='<a href="#" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', '+i+'); return false\">'+(i+1)+'</a> '
pcontent+='<a href="#" style="font-weight: bold;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">Next</a>'
paginatediv.innerHTML=pcontent
paginatediv.onclick=function(){ //cancel auto run sequence (if defined) when user clicks on pagination DIV
if (typeof window[sliderid+"timer"]!="undefined")
clearTimeout(window[sliderid+"timer"])
}
}

ContentSlider.turnpage=function(sliderid, thepage){
var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //gather pagination links
for (var i=0; i<slidernodes[sliderid].length; i++){ //For each DIV within slider
paginatelinks[i].className="" //empty corresponding pagination link's class name
slidernodes[sliderid][i].style.display="none" //hide DIV
}
paginatelinks[thepage].className="selected" //for selected DIV, set corresponding pagination link's class name
slidernodes[sliderid][thepage].style.display="block" //show selected DIV
//Set "Next" pagination link's (last link within pagination DIV) "rel" attribute to the next DIV number to show
paginatelinks[paginatelinks.length-1].setAttribute("rel", thenextpage=(thepage<paginatelinks.length-2)? thepage+1 : 0)
if (enablepersist)
setCookie(sliderid, sliderid+":"+thepage)
}

ContentSlider.autoturnpage=function(sliderid, autorunperiod){
var paginatelinks=document.getElementById("paginate-"+sliderid).getElementsByTagName("a") //Get pagination links
var nextpagenumber=parseInt(paginatelinks[paginatelinks.length-1].getAttribute("rel")) //Get page number of next DIV to show
ContentSlider.turnpage(sliderid, nextpagenumber) //Show that DIV
window[sliderid+"timer"]=setTimeout(function(){ContentSlider.autoturnpage(sliderid, autorunperiod)}, autorunperiod)
}

function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value
}

////////////////Ajax Related functions //////////////////////////////////

ContentSlider.ajaxpage=function(url, thediv){
var page_request = false
var bustcacheparameter=""
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
thediv.innerHTML=csloadstatustext
page_request.onreadystatechange=function(){
ContentSlider.loadpage(page_request, thediv)
}
if (csbustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}

ContentSlider.loadpage=function(page_request, thediv){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
thediv.innerHTML=page_request.responseText
}

ContentSlider.loadobjects=function(externalfiles){ //function to load external .js and .css files. Parameter accepts a list of external files to load (array)
for (var i=0; i<externalfiles.length; i++){
var file=externalfiles[i]
var fileref=""
if (csloadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
csloadedobjects+=file+" " //Remember this object as being already added to page
}
}
}


//*****************************************
// Blending Image Slide Show Script- 
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=new Array("/images/featured1.jpg","/images/featured2.jpg","/images/featured3.jpg")

//specify corresponding links
var slidelinks=new Array("http://www.dynamicdrive.com","http://javascriptkit.com","http://www.geocities.com")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}


// JavaScript Cookie Code
// Coding by Ammon Johns
// www.webmarketingplus.co.uk

var cDomain = self.location.hostname;
if(cDomain.indexOf(".") < cDomain.lastIndexOf(".")){
  var domainOffset = cDomain.indexOf(".")+1
  cDomain = cDomain.substr(domainOffset);
}

if(document.referrer.indexOf(cDomain)==-1 && document.referrer!="" && document.cookie.indexOf("referrer=")==-1){
var expDays = 90;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
var refdate = new Date();
document.cookie = "referrer=" + escape(document.referrer + "&&&" + refdate.toGMTString()) + "; expires=" + exp.toGMTString() + "; path=/" + "; domain=" + cDomain;
}

var allCookies = document.cookie;
var cPos = allCookies.indexOf("referrer=");
if(cPos != -1){
var cdstart = cPos + 9;
var cdend = allCookies.indexOf(";", cdstart);
if(cdend == -1) cdend = allCookies.length;
var cookieContent = allCookies.substring(cdstart,cdend);
cookieContent = unescape(cookieContent);
var cdatestart = cookieContent.indexOf("&&&", 0);
var cdateend = cookieContent.length;
var cRefer = cookieContent.substring(0,cdatestart);
var cDateRef = cookieContent.substring(cdatestart +3,cdateend)
}
else{
var cRefer = "No cookie";
var cDateRef = "No cookie";
}
// Using Google analytics cookies


var cAnalytics = allCookies.indexOf("__utmz=");
if(cAnalytics != -1){
var cAnalyticsStart = cAnalytics + 8;
var cAnalyticsEnd = allCookies.indexOf(";", cAnalyticsStart);
if(cAnalyticsEnd == -1) cAnalyticsEnd = allCookies.length;
var cAnalyticsContent = allCookies.substring(cAnalyticsStart,cAnalyticsEnd);
cAnalyticsContent = unescape(cAnalyticsContent);
var cSTART = cAnalyticsContent.indexOf("utmccn=", 0);
var cCCN = cAnalyticsContent.indexOf("|utmcsr=", cSTART);
var cCSR = cAnalyticsContent.indexOf("|utmctr=", cCCN);
var cCTR = cAnalyticsContent.indexOf("|utmcmd=", cCSR);
var cEND = cAnalyticsContent.length;
var cAnalyticsCampaign = cAnalyticsContent.substring(cSTART +7,cCCN);
var cAnalyticsSource = cAnalyticsContent.substring(cCCN +8,cCSR);
var cAnalyticsTerm = cAnalyticsContent.substring(cCSR +8, cCTR);
var cAnalyticsMedium = cAnalyticsContent.substring(cCTR +8,cEND)
}
else{
var cAnalyticsCampaign = "No data";
var cAnalyticsSource = "No data";
var cAnalyticsTerm = "No data";
var cAnalyticsMedium = "No data";
}

