

var IFrameObj; // our IFrame object
function callToServer(page) {
  if (!document.createElement) 
  {return true};
  var IFrameDoc;
  var URL = page;
  if (!IFrameObj && document.createElement) {
    // create the IFrame and assign a reference to the
    // object to our global variable IFrameObj.
    // this will only happen the first time 
    // callToServer() is called
   try {
      var tempIFrame=document.createElement('iframe');
      tempIFrame.setAttribute('id','RSIFrame');
      tempIFrame.style.border='0px';
      tempIFrame.style.width='0px';
      tempIFrame.style.height='0px';
      IFrameObj = document.body.appendChild(tempIFrame);
      
      if (document.frames) {
        // this is for IE5 Mac, because it will only
        // allow access to the document object
        // of the IFrame if we access it through
        // the document.frames array
        IFrameObj = document.frames['RSIFrame'];
      }
    } catch(exception) {
      // This is for IE5 PC, which does not allow dynamic creation
      // and manipulation of an iframe object. Instead, we'll fake
      // it up by creating our own objects.
      iframeHTML='\<iframe id="RSIFrame" style="';
      iframeHTML+='border:0px;';
      iframeHTML+='width:0px;';
      iframeHTML+='height:0px;';
      iframeHTML+='"><\/iframe>';
      document.body.innerHTML+=iframeHTML;
      IFrameObj = new Object();
      IFrameObj.document = new Object();
      IFrameObj.document.location = new Object();
      IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
      IFrameObj.document.location.replace = function(location) {
        this.iframe.src = location;
      }
    }
  }
  
  if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
    // we have to give NS6 a fraction of a second
    // to recognize the new IFrame
    setTimeout('callToServer()',10);
    return false;
  }
  
  if (IFrameObj.contentDocument) {
    // For NS6
    IFrameDoc = IFrameObj.contentDocument; 
  } else if (IFrameObj.contentWindow) {
    // For IE5.5 and IE6
    IFrameDoc = IFrameObj.contentWindow.document;
  } else if (IFrameObj.document) {
    // For IE5
    IFrameDoc = IFrameObj.document;
  } else {
    return true;
  }
  
  IFrameDoc.location.replace(URL);
  return false;
}




function handleResponse(msg,el) {

var oSrc= document.getElementById(el + 't')
oSrc.className = 'tabsmenu_active'

var oSrcL= document.getElementById(el + 'l')
oSrcL.className = 'tabsmenu_L_active'

var oSrcR= document.getElementById(el + 'r')
oSrcR.className = 'tabsmenu_R_active'

for (var i=0; i < 6; i++) 
{
     var oItem = document.getElementById('tab' + (i + 1));
		
		if (el != oItem.name) {
			
		//	oItem.className = 'Tab';
			var myidname = (oItem.name + 'x');
			var myhidden = document.getElementById(myidname);
			//alert(myidname)
			myhidden.style.display = 'none';
			
			var td = (oItem.name + 't');
			var mytd = document.getElementById(td)
			mytd.className = 'tabsmenu';
			
			var tdL = (oItem.name + 'l');
			var mytdL = document.getElementById(tdL)
			mytdL.className = 'tabsmenu_L';
			
			var tdR = (oItem.name + 'r');
			var mytdR = document.getElementById(tdR)
			mytdR.className = 'tabsmenu_R';
			
		}
}

var myframe = document.getElementById(el + 'x');
myframe.innerHTML = msg;
myframe.style.display = '';
}




function clickTab(oSrcname) 
{
    var oSrc = document.getElementById(oSrcname + 'x');
    
	var thistd = document.getElementById(oSrcname + 't'); 
   var thistdL = document.getElementById(oSrcname + 'l');
   var thistdR = document.getElementById(oSrcname + 'r');

	for (var i=0; i < 6; i++) {
		var oItem = document.getElementById('tab' + (i + 1));
		
		if (oSrc.id != oItem.id) {
			//	oItem.className = 'Tab';
			var myid = document.getElementById(oItem.name + 'x')
			myid.style.display = 'none'
		
			var td = (oItem.name + 't');
			var mytd = document.getElementById(td)
			mytd.className = 'tabsmenu';
			
			var tdL = (oItem.name + 'l');
			var mytdL = document.getElementById(tdL)
			mytdL.className = 'tabsmenu_L';
			
			var tdR = (oItem.name + 'r');
			var mytdR = document.getElementById(tdR)
			mytdR.className = 'tabsmenu_R';
			
			
		}
	}
	
	//oSrc.className = 'TabSelect';
	oSrc.style.display = ''	
    thistd.className = 'tabsmenu_active'
	thistdL.className = 'tabsmenu_L_active'
	thistdR.className = 'tabsmenu_R_active'
    
return false;
}



