
function getDocumentWidth()
{
 var myWidth = 0;

 if ( typeof( window.innerWidth ) == 'number' ) 
 {
  //Non-IE
  myWidth = window.innerWidth;
 } 
 else 
 {
  if (document.documentElement && document.documentElement.clientWidth) 
  {
   //IE 6+ in 'standards compliant mode'
   myWidth = document.documentElement.clientWidth;
  }
  else 
  {
   if (document.body && document.body.clientWidth) 
   {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
   }
  } 
 }

 return myWidth;
}


function getSelectValue(element)
{
 var selected = element.options[element.selectedIndex].value

 return selected;
}


function getRadioButtonValue(element)
{
 var selected = "";
 
 for (var button = 0; button < element.length; button++)
 {
 
   if (element[button].checked == true)
   {
     selected = element[button].value; 
   }
 }

 return selected;
}


function getElementStyle(elementName)
{
 var elementStyle = getElement(elementName).style;
 return elementStyle;
}



function getElement(elementId)
{
 var element = null;

 if (document.all)
 {
  element = document.all[elementId];
 }
 else if (document.getElementById)
 {
  element = document.getElementById(elementId);
 }

 return element;
}
