// JavaScript Document
window.status="NetVision Solutions";

function findObj(n) { 
    return document.getElementById(n); 
}

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/***********************************************
* Start : topMenu
***********************************************/
function show(page) {
	location.href = page;	
}
/***********************************************
* Stop : topMenu
***********************************************/

/***********************************************
* Start : leftMenu
***********************************************/

function leftMIover(ob){	
	obj=findObj(ob); 	
	obj.className = "leftMIover";
	obj.clicked = 0;
}

function goTo(page){
	obj.clicked = 1;
	location.href = page;	
}

function leftMInormal(){				
	if(obj.clicked!=1){
		obj.className = "leftMI";
	}	
}
/***********************************************
* Stop : leftMenu
***********************************************/

/***********************************************
* Start : tableRow
***********************************************/
function tableRowOver(ob){	
	trObj=findObj(ob); 	
	trObj.className = "tableRowOver";
}

function tableRow(){					
	trObj.className = "tableRow";	
}
/***********************************************
* Stop : tableRow
***********************************************/

/***********************************************
* Start : usual SwapImage for general use
***********************************************/
function usualSwapImage() { // Functie folosita in general pentru image swap
  var a=usualSwapImage.arguments; 
  if ((z=findObj(a[0]))!=null){
  	if(!z.oSrc) 
		z.oSrc=z.src; 
	z.src=a[1];
	}
}

function usualImgRestore() { // Functie pentru restore in general
   	z.src=z.oSrc;	
}
/***********************************************
* Stop : usual SwapImage for general use
***********************************************/


/******************************************
*Start : Fade Effect
*******************************************/
fadeColor = "#000000";  // color to fade to
stepIn = 16; // delay when fading in
stepOut = 50; // delay when fading out

/* set to true or false; true will
** cause all links to fade automatically
** (you won't need to add class="fade")
***/
autoFade = true;  

/* set to true or false; true will cause all CSS
** classes with "fade" in them to fade onmouseover
***/
sloppyClass = true;

/* set to true or false; true will make the script
** work for Macs (IE 5+), but you will have to give
** a name (name="blah") to each link that you want
** to fade.
***/
macCompat = false;

hexa = new makearray(16);
for(var i = 0; i < 10; i++)
    hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";

document.onmouseover = domouseover;
document.onmouseout = domouseout;

fadeColor = dehexize(fadeColor.toLowerCase());

var fadeId = new Array();

function dehexize(Color){
	var colorArr = new makearray(3);
	for (i=1; i<7; i++){
		for (j=0; j<16; j++){
			if (Color.charAt(i) == hexa[j]){
				if (i%2 !=0)
					colorArr[Math.floor((i-1)/2)]=eval(j)*16;
				else
					colorArr[Math.floor((i-1)/2)]+=eval(j);
			}
		}
	}
	return colorArr;
}

function domouseover() {
	if(document.all){
		var srcElement = event.srcElement;
		if ((srcElement.tagName == "A" && autoFade && srcElement.className != "nofade") || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) {
				if (!srcElement.startColor) {
					srcElement.startColor = (srcElement.style.color)? srcElement.style.color: srcElement.currentStyle.color;
					srcElement.startColor = dehexize(srcElement.startColor.toLowerCase());
				}
				var link = (macCompat? srcElement.name: srcElement.uniqueID);
				if (link) fade(srcElement.startColor,fadeColor,link,stepIn);				
				else if (macCompat) alert("Error: Mac Compatility mode enabled, but link has no name.");
		}
	}
}

function domouseout() {
	if (document.all){
		var srcElement = event.srcElement;
		if ((srcElement.tagName == "A" && autoFade && srcElement.className != "nofade") || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) {
			var link = (macCompat? srcElement.name: srcElement.uniqueID);
			if (link) fade(fadeColor,srcElement.startColor,link,stepIn);
		}
	}
}

function makearray(n) {
    this.length = n;
    for(var i = 1; i <= n; i++)
        this[i] = 0;
    return this;
}

function hex(i) {
    if (i < 0)
        return "00";
    else if (i > 255)
        return "ff";
    else
       return "" + hexa[Math.floor(i/16)] + hexa[i%16];
}

function setColor(r, g, b, element) {
      var hr = hex(r); var hg = hex(g); var hb = hex(b);
      element.style.color = "#"+hr+hg+hb;
}

function fade(s,e,element,step) {
	var sr = s[0]; var sg = s[1]; var sb = s[2];
	var er = e[0]; var eg = e[1]; var eb = e[2];
	
	if (fadeId[0] != null && fade[0] != element && eval(fadeId[0])) {
		var orig = eval(fadeId[0]);
		setColor(orig.startColor[0],orig.startColor[1],orig.startColor[2],orig);
		var i = 1;
		while(i < fadeId.length) {
			clearTimeout(fadeId[i]);
			i++;
		}
	}
		
	for(var i = 0; i <= step; i++) {
		fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +
			step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+
			")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step);
	}
	fadeId[0] = element;
}
/******************************************
*Stop : Fade Effect
*******************************************/



/******************************************
*Start : Vertical  News Scroller
*******************************************/
var tp = 0;
var mouseOver = 0;
   function makeMove(){ 
   		var tm=setTimeout("makeMove()",100); 
   		if(mouseOver==0){
			divNewsText.style.top=tp; 
			tp--; 
			if(tp==-250){ 
				tp=70; 
			}
		}
   }
/******************************************
*Stop : Vertical News Scroller
*******************************************/

/******************************************
*Start : Home
*******************************************/
function homeSwitch(opId) {	
	var optionDesc = findObj("optionDesc");
	if(opId==1){
		optionDesc.innerHTML="<div class='homeTitle'>custom programming services</div><br><div class='homeDesc' id='homeDesc'>Our secret to success is that at NetVision Solutions, we focus on more than the software and the tools used to produce the software. We focus on you, the customer, and your needs in order to deliver the best possible software solution.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesCustom.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>read more</a></div>";
	}else if(opId==2){
		optionDesc.innerHTML="<div class='homeTitle'>data services</div><br><div class='homeDesc' id='homeDesc'>If you need to measure and analyze the performance of your business, Net Vision Solutions is here to serve you. We apply On-Line Analytical Processing (OLAP) technology to solve this kind of problems for you.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesData.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>read more</a></div>";
	}else if(opId==3){
		optionDesc.innerHTML="<div class='homeTitle'>project management consulting</div><br><div class='homeDesc' id='homeDesc'>Develop your business requirements, select a software supplier, and select a software application, once the application is up and running the work truly just begins. We help you greatly increase your odds of having a successful implementation project.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesProject.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>read more</a></div>";
	}else if(opId==4){
		optionDesc.innerHTML="<div class='homeTitle'>website design &amp; development</div><br><div class='homeDesc' id='homeDesc'>Whether you already have an established business, want to start an online business, or you need to put your business information or products online, NetVision Solutions will design an appropriate web presence for you.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesWeb.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>read more</a></div>";
	} 	
}

function homeSwitchRo(opId) {	
	var optionDesc = findObj("optionDesc");
	if(opId==1){
		optionDesc.innerHTML="<div class='homeTitle'>aplicatii specifice</div><br><div class='homeDesc' id='homeDesc'>Serviciile de realizare a aplicatiilor specifice se orienteaza catre acele nevoi clare care nu sunt acoperite de modulele existente in sistemele informatice integrate clasice sau de tip ERP. Aceste aplicatii specifice vor fi proiectate si dezvoltate pentru a putea fi integrate cu sistemele deja implementate. Ne vom concentra pe nevoile specifice clientului pentru a putea livra cea mai buna solutie.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesCustom.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>detalii</a></div>";
	}else if(opId==2){
		optionDesc.innerHTML="<div class='homeTitle'>prelucrare de date</div><br><div class='homeDesc' id='homeDesc'>Daca aveti nevoie sa masurati si sa analizati performanata afacerii dumneavoastra, NetVision Solutions este aici pentru a va ajuta. Pentru a rezolva astfel de probleme, folosim tehnologia On-Line Analytical Processing (OLAP)<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesData.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>detalii</a></div>";
	}else if(opId==3){
		optionDesc.innerHTML="<div class='homeTitle'>consultanta</div><br><div class='homeDesc' id='homeDesc'>Implementarea unui sistem informatic este un proces mult mai complicat decat pare la prima vedere, care necesita investitii importante si care poate imbunatati semnificativ activitatile din cadrul unei companii. El poate insa esua datorita unor factori precum incompatibilitatea dintre furnizor si beneficiar, stabilirea incompleta sau inexacta a obiectivelor pe care le urmareste implementarea sistemului, proiecte de implementare care depasesc timpul si bugetul alocat.. Lucrand metodic, NetVision Solutions ofera servicii de consultanta si va poate ajuta in realizarea unui proiect de succes.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesProject.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>detalii</a></div>";
	}else if(opId==4){
		optionDesc.innerHTML="<div class='homeTitle'>web design</div><br><div class='homeDesc' id='homeDesc'>Daca ai deja o afacere profitabila, vrei sa incepi o noua afacere online, vrei un web site cu informatii accesibile in permanenta despre compania si produsele tale, NetVision Solutions va poate creea imaginea potrivita pe internet.<br><br><img src=Images/leftSubmenuArrow.gif><a href=solServicesWeb.asp onMouseOver=setOver('homeDesc') onMouseOut=setNormal();>detalii</a></div>";
	} 	
}

function setOver(objId){
	ob = findObj(objId);
	ob.style.color = "#656654";
}

function setNormal(){	
	ob.style.color = "#999999";
}

function setROver(objId){
	obR = findObj(objId);
	obR.style.background = "#FAFAFA";
}

function setRNormal(){	
	obR.style.background = "#FFFFFF";
}

function homeInitial(lang) {
	var optId = 1 + Math.round(3*Math.random());
	if(lang==1)
		homeSwitch(optId);
	else
		homeSwitchRo(optId);
}

/******************************************
*Stop : Home
*******************************************/

