function results(mode){
	if (mode == "hide") {
		document.getElementById('results').style.display='none'
		document.getElementById('show_r').style.display='block'
	} else {
		document.getElementById('results').style.display='block'
		document.getElementById('show_r').style.display='none'
	}
}

function roller(img){
	document.getElementById("main").src=img;
	//alert('called');
	return false;
}

var switcher = 0;
function swapper(show,hide){
		document.getElementById(show).style.display='table-row'
		document.getElementById(hide).style.display='none'
}

function plusMin(id) {
	//alert('called');
	imSrc = document.getElementById(id).src
	len = imSrc.length;
	check = len - 8;
	if(imSrc.substr(check,len) != 'plus.gif') {
		document.getElementById(id).src='images/plus.gif';
	} else {
		document.getElementById(id).src='images/minus.gif';
	}
}

function swappper(show,hide){
		document.getElementById(show).style.display='block'
		document.getElementById(hide).style.display='none'
}

function onOff(itemId) {
	//alert('called');
	var status
	status = document.getElementById(itemId).style.display
	//alert(status);
	if (status == 'block') {
		document.getElementById(itemId).style.display='none'
	} else {
		document.getElementById(itemId).style.display='block'
	}
}

function popShow(x) {
	//alert('called');
	document.getElementById(x).style.display='block';
}

function closer(x) {
	document.getElementById(x).style.display='none';
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function getsupport ( selectedtype )
{
  document.supportform.supporttype.value = selectedtype ;
  document.supportform.submit() ;
}


function sizer(obj,objh,objw) {
	//alert ('called');
	if (objh != 'null') {
		document.getElementById(obj).style.height = objh;
	}
	if (objw != 'null') {
		document.getElementById(obj).style.width = objw;
	}
}

function swap_sizer(obj,newheight,oldheight) {
	if(document.getElementById(obj).style.height == newheight) {
		document.getElementById(obj).style.position = 'relative';
		document.getElementById(obj).style.top = '0px';
		document.getElementById(obj).style.right = '0px';
		document.getElementById(obj).style.height = oldheight;
		document.getElementById(obj).style.border = 'none';
		document.getElementById('actual_links').style.display='none';
	} else {
		document.getElementById(obj).style.position = 'absolute';
		document.getElementById(obj).style.top = '0px';
		document.getElementById(obj).style.right = '0px';
		document.getElementById(obj).style.border = '2px solid #444';
		document.getElementById(obj).style.height = newheight;
		document.getElementById('actual_links').style.display='block';
	}
}

 function popup(url, popup, options){ 
 //popup('http://www.whatever.com/index.html','newwindow', 'toolbar=1, location=1, top=200, status=1, height=100, width=100, left=400'); return false;">
 /* 
 url, required: the url to open, eg 'http://jimmont.com' or '/resrc/' 
 popup, optional: the name or target for the window to open, eg 'my_popup' or 'portfolioWindow' 
 options, optional: if present are using instead of the defaults 
 */ 
      // if you didn't give a location to open, just skip out using 'return' 
      if(!url) return; 
      var mypopup; 
      // setup a place to save a list of opened windows 
      if(!arguments.callee.popups) arguments.callee.popups = {}; 
      // if you previously opened this window-name re-use the window 
      if(popup && arguments.callee.popups[popup]) mypopup = arguments.callee.popups[popup]; 
      // popup window chrome details: 0 is same as no/false, 1 is same as yes/true 
      var details = (typeof options == 'string' && /=/.test(options))? options : 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width='+(screen.availWidth/3)+',height='+(screen.availHeight/2)+',top=200,left=500'; 
      // create the popup, or redirect an existing one to this place 
      if(typeof mypopup != 'undefined' && !mypopup.closed) mypopup.location = url; 
      else mypopup = window.open(url,(typeof popup == 'string' ? popup :''),details); 
      if(typeof popup != 'undefined' && !arguments.callee.popups[popup]) arguments.callee.popups[popup] = mypopup; 
      // bring the popup window into the foreground 
      if(mypopup && mypopup.focus) mypopup.focus(); 
 }
 
 
 function clicker(obj,button,newWidth) {
		var inputter = document.getElementById(obj);
		inputter.className = 'active_input';
		inputter.style.width = newWidth + 'px';
		document.getElementById(button).style.display = 'inline';
}

function clacker(obj,button,newWidth) {
		var inputter = document.getElementById(obj);
		inputter.className = 'inactive_input';
		inputter.style.width = newWidth + 'px';
		document.getElementById(button).style.display = 'none';
}

function clearer(inputter) {
	//alert(inputter);
	//alert('input ' + inputter[0].value);
	inputter[0].value = "";
}

function resetter(formm) {
	for (e=0; e<formm.elements.length; e++) {
		formm.elements[e].value = "xxx"
	}
}

function blogSwapper(mode) {
	blog = document.getElementById('transmission_holder');
	menu = document.getElementById('department');
	if (mode == 'blog') {
		blog.style.display = 'block';
		menu.style.display = 'none';
	} else {
		blog.style.display = 'none';
		menu.style.display = 'block';
	}
}

