function MM_findObj(n, d) { //v3.0
  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); return x;
}

/* Functions that swaps images. */
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];}
}

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;
}

/* Functions that handle preload. */
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];}}
}

self.defaultStatus="http://www.totallywebdesign.com";

function dropdown(pg){
document.layers["CatFrame"].src=pg
}

function getLen(){
y=document.addLink.siteDesc.value.length
alert(y)
}

function chkDesc(){
var u,v,w,x,y,ok_flag
u=document.addLink.who.value
v=document.addLink.from.value
w=document.addLink.siteName.value
x=document.addLink.siteURL.value
y=document.addLink.siteDesc.value.length

if(y > 256){
	alert("Please shorten your site description to 256 characters or less.");
	ok_flag = 1
	}
	else
	{
	ok_flag = 0
	}
	
if(u=="" || v=="" || w=="" || x==""){
alert("All fields must be filled in.")
ok_flag = 1
}
else
{
ok_flag = 0
}

if(ok_flag == 0){
return true
}
else
{
return false
}
}

function getLen_Feedback(){
y=document.Feedback.siteDesc.value.length
alert(y)
}

function chkDesc_Feedback(){
var u,v,y,ok_flag
u=document.Feedback.who.value
v=document.Feedback.from.value
y=document.Feedback.siteDesc.value.length

if(y > 256){
	alert("Please shorten your Feedback to 256 characters or less.");
	ok_flag = 1
	}
	else
	{
	ok_flag = 0
	}
	
if(u=="" || v=="" || y==""){
alert("All fields must be filled in.")
ok_flag = 1
}
else
{
ok_flag = 0
}

if(ok_flag == 0){
return true
}
else
{
return false
}
}



function setBgColor (what, bg) {
    document.getElementById(what).style.backgroundColor = bg;
	document.getElementById(what).style.color= "white";
	var allDIVs = document.getElementsByTagName("div");
	var count=allDIVs.length;
	for(d=0;d<count;d++){
		var which=allDIVs[d].id
		if(what==which){}
			else
				{
				document.getElementById(which).style.backgroundColor = "white";
				document.getElementById(which).style.color= "black";
				}
			}		
	parent.document.addLink.Category.value=what
		}

function chgCursor(what){
document.getElementById(what).style.cursor = "default";
}

imgload=new Array()
imgload[0]="Images_NewCEB/accountinga.gif"
imgload[1]="Images_NewCEB/computera.gif"
imgload[2]="Images_NewCEB/economica.gif"
imgload[3]="Images_NewCEB/englisha.gif"
imgload[4]="Images_NewCEB/financea.gif"
imgload[5]="Images_NewCEB/lawa.gif"
imgload[6]="Images_NewCEB/managementa.gif"
imgload[7]="Images_NewCEB/marketinga.gif"
imgload[8]="Images_NewCEB/offadmina.gif"
imgload[9]="Images_NewCEB/indexa.gif"
imgload[10]="Images_NewCEB/start.gif"

function swapimg(ind)
{
document.imgtop.src=imgload[ind]
}
