

function ChBkgrnd(id, state,bgim) {
var elmnt = document.getElementById(id);
      if (state==true){	
			elmnt.style.color = '#ffffff';
			elmnt.bgColor = '#000';
		}
		else {
 		 if (id == 'mDLink'){
			elmnt.style.color = '#F00000';
			elmnt.bgColor = '#ffffff';
		 }
		 else {
			elmnt.style.color = '#999999';
			elmnt.bgColor = '#ffffff';
		 }
}
}

function ChPct(id,imgSrc) {
   document.images[id].src = imgSrc;
}

function Clck(url) {
		location.href = url;
		location.prototype = '_blank';
}

function onW(url) {
		window.open(url)
}


function ATF() {
var agt = navigator.userAgent.toLowerCase();
var app = navigator.appName.toLowerCase();
var ieAgent = agt.indexOf('msie');
var nsAgent = app.indexOf('netscape');
var opAgent = app.indexOf('opera');

if (ieAgent!= -1) {window.external.addfavorite(location.href,document.title); }
   else if (nsAgent!= -1) {
      document.getElementById('iHintF').style.visibility = 'visible';
	 }
	 
   else if (opAgent!= -1) {
     document.getElementById('iHintF').style.visibility = 'visible';
     }

}

function validate() {
var val = document.getElementById('fSearch').value;
var srchfld = document.getElementById("fSearch");

srchfld.focus();


    if (val.length > 2){
	    document.getElementById('frmSearch').submit();
	}
	else {
	    srchfld.value = '';
		return false;
	}

}

function PSc(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {
		yScroll = document.body.scrollTop;
	}
	
	aPSc = new Array('',yScroll) 
	return aPSc;
}



function PS(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else {
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) {
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	aPS = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return aPS;
}


function ShowPUWnd(){
    var drkarea = document.getElementById('darkBackgroundLayer');
	var puwindow = document.getElementById('puwindow');
	
	var PageSize = PS();
	var PageScroll = PSc();


drkarea.style.display = 'block';

	var puwTop = PageScroll[1] + ((PageSize[3] - 35 - 240) / 2);
	var puwLeft = ((PageSize[0] - 20 - 450) / 2);

		puwindow.style.top = (puwTop < 0) ? "0px" : puwTop + "px";
		puwindow.style.left = (puwLeft < 0) ? "0px" : puwLeft + "px";
	
	puwindow.style.display = 'block';
}

function  HidePUW() {

    var drkarea = document.getElementById('darkBackgroundLayer');
	var puwindow = document.getElementById('puwindow');

	drkarea.style.display = 'none';
	puwindow.style.display = 'none';
}

function GoUp() {
	window.scrollTo(0,0);
}

function prlimgs() {

if (document.images)
    {
      Img1 = new Image();
      Img2 = new Image();
      Img3 = new Image();
      Img4 = new Image();
      Img5 = new Image();
      Img6 = new Image();
      Img7 = new Image();
      Img8 = new Image();
      Img9 = new Image();
      Img10 = new Image();
      Img11 = new Image();
      Img12 = new Image();
      Img13 = new Image();
      Img14 = new Image();
      Img15 = new Image();

      Img1.src = "http://www.fitascorp.com/img/logo.gif";
      Img2.src = "http://www.fitascorp.com/img/BanerCont1.gif";
      Img3.src = "http://www.fitascorp.com/img/star.gif";
      Img4.src = "http://www.fitascorp.com/img/kis9bb.jpg";
      Img5.src = "http://www.fitascorp.com/img/spwdctrbx.jpg";
      Img6.src = "http://www.fitascorp.com/img/kavbx.jpg";
      Img7.src = "http://www.fitascorp.com/img/regmechbx.jpg";
      Img8.src = "http://www.fitascorp.com/img/kavmbx.jpg";
      Img9.src = "http://www.fitascorp.com/img/kmsbx.jpg";
      Img10.src = "http://www.fitascorp.com/img/mi.gif";
      Img11.src = "http://www.fitascorp.com/img/newformac.gif";
      Img12.src = "http://www.fitascorp.com/img/w7comp.gif";
      Img13.src = "http://www.fitascorp.com/img/logo-b.gif";
      Img14.src = "http://www.fitascorp.com/img/menu_go1.gif";
      Img15.src = "http://www.fitascorp.com/img/BanerCont.gif";

	}
}
  
