function linkchange(){
var lnk = ge('fm_mid');
var atag = lnk.getElementsByTagName('a');
//disable all links in fm_mid
for(i=0; i<atag.length; i++) {
	atag[i].onclick = function() {
	return false;
	}
	atag[i].onmouseover = function() {
	window.status='';
	return true;
	}
	
}
//renable bottom button links
for(i=1; i<5; i++) {
var lnks = ge('blnk_'+i);
lnks.onclick = function() {
	return true;
}
}

var ultag = lnk.getElementsByTagName('ul');
for(i=0; i<ultag.length; i++) {

	if(ultag[i].className == 'navlist') {
	var ulID = ultag[i].id;
	link_onlick(ulID)
	}

}

}//end linkchange function
addLoadEvent(linkchange)


function link_onlick(ulID){
var ul_1 = ge(ulID)
var nID = ulID.substring(3)
ul_a = ul_1.getElementsByTagName('a')

	for(i2=0; i2<ul_a.length; i2++) {
	ul_a[i2].onclick = function() {
	var uid = this.id;
	var spl = uid.split("_")
	data_update(nID, spl[0], spl[1])
	return false;
	}
	}

}//end link_onlick function

function expa(id) {

exdiv = ge('fm'+id+'_ex')
exdiv2 = ge('fm'+id+'_hide')
var len = 4;

//close any open comments and delete sub_comments
for(i=0; i<len; i++){
i2 = i+1;
ge('fm'+i2+'_hide').style.display="none";
}//end for

exdiv2.style.display="inline";
} // end expa

//functions for info data updating

function data_update(id, funct, bnum) {
ajax_call(id, funct, bnum)
}


function ajax_call(id, fcode, bnum) {
var url = '../WTsite_files/contents/ajax/get_info.php?id='+id+'&fcode='+fcode;
//server update code
http_request = false;

        // Mozilla/Safari
        if (window.XMLHttpRequest) {
                http_request = new XMLHttpRequest();
                http_request.overrideMimeType('text/xml');
        }
        // IE
        else if (window.ActiveXObject) {
                http_request = new ActiveXObject("Microsoft.XMLHTTP");
        }


        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
		
http_request.onreadystatechange = alertContents;
    http_request.open('post', url, true);
    http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    http_request.send(null);

function alertContents() {

        if (http_request.readyState == 4) {
         	if (http_request.status == 200) {
		
res = http_request.responseText;

ib = ge('info_box_'+id)
//empty info_box
delete_contents(id)

iul = ge('ul_'+id)
len2 = iul.getElementsByTagName('li').length
for(i=0; i<len2; i++){
iul.getElementsByTagName('li')[i].style.backgroundColor="transparent";
}
iul.getElementsByTagName('li')[bnum].style.backgroundColor="#E8EFF4";

ib.innerHTML = res;
		

		
		} else {
                alert('There was a problem with the request.');
            }
        }
		}

}

function delete_contents(id) {
//delete sub_comments area to hide
if (ib.hasChildNodes())
{
while( ib.firstChild ) {
    //delete all the stat info 
    ib.removeChild( ib.firstChild );
}
}
}
//////////////////////////////////////////////////////



function ordern(id) {
ib = ge('fm_mid')
itx = ge('ttext')

if (ib.hasChildNodes())
{
while( ib.firstChild ) {
    //delete all the stat info 
    ib.removeChild( ib.firstChild );
}
}

ib.style.height = '40em';
itx.innerHTML = '';


string = "<div id=\"fm1\">";

string += "<h5>Thank you for choosing the Standalone plan.</h5>";
string += "<p><strong>This plan includes the following...</strong><br />100 MB Transfer <br /> 30 MB Max Size</p>";


string += "<img src=\"images/fm_mid_1.jpg\" class=\"fm_mid_IMG\"></div>";

ib.innerHTML = string;






//<span><em class=\"ds\">$</em><strong class=\"price\">20</strong><strong  class=\"price2\">.00</strong>/month<br /></span>
}







function showmore() {
ge('lbox').style.display = 'block';
}




//function for multiple window onloads
function addLoadEvent(func) {
var oldonload = window.onload;
if(typeof window.onload != 'function') {
	window.onload = func;
} else {
window.onload = function() {
	oldonload();
	func();
}
}
}
//////////////////////////////////////