var ms = navigator.appVersion.indexOf("MSIE");
from = 700;
to = -700;
moveto = 2;
myImage = new Array(13);

function openWindows(url, window_width, window_height, scroll, window_left, window_top) {
if (window_top == null)
	window_top = (screen.height - window_height) / 2;

if (window_left == null)
	window_left = (screen.width - window_width) /2 ;

if (scroll == null)
	scroll = 'yes';
    open(url, 'page', 'directories=no, location=no, height='+window_height+', left='+ window_left+', menubar=no, resizable=yes, scrollbars='+scroll+', status=no, toolbar=no, top='+ window_top+', width='+window_width);
}

function move() {
	if (from > to) {
		if ((ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4))
		{
			document.all.texte.style.left = (from -= moveto);
		}
		else
		{
			document.all.texte.style.left = (from -= moveto);
		};
		setTimeout('move(' + from + ',' + to + ',' + moveto + ')', 70);
	}
	else
	{
		from = 700;
		setTimeout('move(' + from + ',' + to + ',' + moveto + ')', 70);
	}
}

function preloadimages() {
myImage[0] = new Image();
myImage[0].src = "http://www.webvisia.com/images/buttonhomelite.gif";
myImage[1] = new Image();
myImage[1].src = "http://www.webvisia.com/images/buttonproductslite.gif";
myImage[2] = new Image();
myImage[2].src = "http://www.webvisia.com/images/buttonbuylite.gif";
myImage[3] = new Image();
myImage[3].src = "http://www.webvisia.com/images/buttonsupportlite.gif";
myImage[4] = new Image();
myImage[4].src = "http://www.webvisia.com/images/buttondownloadlite.gif";
myImage[5] = new Image();
myImage[5].src = "http://www.webvisia.com/images/buttonnewslite.gif";
myImage[6] = new Image();
myImage[6].src = "http://www.webvisia.com/images/buttonpromotionslite.gif";
myImage[7] = new Image();
myImage[7].src = "http://www.webvisia.com/images/buttonforumlite.gif";
myImage[8] = new Image();
myImage[8].src = "http://www.webvisia.com/images/buttonpalmoslite.gif";
myImage[9] = new Image();
myImage[9].src = "http://www.webvisia.com/images/buttonpocketpclite.gif";
myImage[10] = new Image();
myImage[10].src = "http://www.webvisia.com/images/buttoncompanylite.gif";
myImage[11] = new Image();
myImage[11].src = "http://www.webvisia.com/images/buttonteamlite.gif";
myImage[12] = new Image();
myImage[12].src = "http://www.webvisia.com/images/buttoncontactuslite.gif";
myImage[13] = new Image();
myImage[13].src = "http://www.webvisia.com/images/buttontipslite.gif";
}

function lightUp(index) {
switch (index) {
case 0:
	document.images["buttonhome"].src=myImage[index].src;
	break;
case 1:
	document.images["buttonproducts"].src=myImage[index].src;
	break;
case 2:
	document.images["buttonbuy"].src=myImage[index].src;
	break;
case 3:
	document.images["buttonsupport"].src=myImage[index].src;
	break;
case 4:
	document.images["buttondownload"].src=myImage[index].src;
	break;
case 5:
	document.images["buttonnews"].src=myImage[index].src;
	break;
case 6:
	document.images["buttonpromotions"].src=myImage[index].src;
	break;
case 7:
	document.images["buttonforum"].src=myImage[index].src;
	break;
case 8:
	document.images["buttonpalmos"].src=myImage[index].src;
	break;
case 9:
	document.images["buttonpocketpc"].src=myImage[index].src;
	break;
case 10:
	document.images["buttoncompany"].src=myImage[index].src;
	break;
case 11:
	document.images["buttonteam"].src=myImage[index].src;
	break;
case 12:
	document.images["buttoncontactus"].src=myImage[index].src;
	break;
case 13:
	document.images["buttontips"].src=myImage[index].src;
	break;
}
}

function dimDown(index) {
switch (index) {
case 0:
	document.images["buttonhome"].src="http://www.webvisia.com/images/buttonhomedark.gif";
	break;
case 1:
	document.images["buttonproducts"].src="http://www.webvisia.com/images/buttonproductsdark.gif";
	break;
case 2:
	document.images["buttonbuy"].src="http://www.webvisia.com/images/buttonbuydark.gif";
	break;
case 3:
	document.images["buttonsupport"].src="http://www.webvisia.com/images/buttonsupportdark.gif";
	break;
case 4:
	document.images["buttondownload"].src="http://www.webvisia.com/images/buttondownloaddark.gif";
	break;
case 5:
	document.images["buttonnews"].src="http://www.webvisia.com/images/buttonnewsdark.gif";
	break;
case 6:
	document.images["buttonpromotions"].src="http://www.webvisia.com/images/buttonpromotionsdark.gif";
	break;
case 7:
	document.images["buttonforum"].src="http://www.webvisia.com/images/buttonforumdark.gif";
	break;
case 8:
	document.images["buttonpalmos"].src="http://www.webvisia.com/images/buttonpalmosdark.gif";
	break;
case 9:
	document.images["buttonpocketpc"].src="http://www.webvisia.com/images/buttonpocketpcdark.gif";
	break;
case 10:
	document.images["buttoncompany"].src="http://www.webvisia.com/images/buttoncompanydark.gif";
	break;
case 11:
	document.images["buttonteam"].src="http://www.webvisia.com/images/buttonteamdark.gif";
	break;
case 12:
	document.images["buttoncontactus"].src="http://www.webvisia.com/images/buttoncontactusdark.gif";
	break;
case 13:
	document.images["buttontips"].src="http://www.webvisia.com/images/buttontipsdark.gif";
	break;
}
}

function productindex(index, url) {
	document.location.href = url+"ProductPlatform="+index;
}

function Change_field(Subscribe) {
Image_big = document.forms["add_software"].Image_big.value;
c = Image_big.lastIndexOf("\\");
document.forms["add_software"].Image_big_name.value=(Image_big.substring(c+1));

Zip_file = document.forms["add_software"].Zip_file.value;
e = Zip_file.lastIndexOf("\\");
document.forms["add_software"].Zip_file_name.value=(Zip_file.substring(e+1));

Img = document.forms["add_software"].Image.value;
b = Img.lastIndexOf("\\");
document.forms["add_software"].Image_name.value=(Img.substring(b+1));

data1 = document.forms["add_software"].Data1.value;
data2 = document.forms["add_software"].Data2.value;
data3 = document.forms["add_software"].Data3.value;
document.forms["add_software"].Date.value = (data1 + "-" + data2 + "-" + data3);

document.forms["add_software"].action="add_software_action.php";
document.forms["add_software"].submit();
}

function Change_field_update(Subscribe) {
Image_big = document.forms["add_software"].Image_big.value;
c = Image_big.lastIndexOf("\\");
document.forms["add_software"].Image_big_name.value=(Image_big.substring(c+1));

Zip_file = document.forms["add_software"].Zip_file.value;
e = Zip_file.lastIndexOf("\\");
document.forms["add_software"].Zip_file_name.value=(Zip_file.substring(e+1));

Img = document.forms["add_software"].Image.value;
b = Img.lastIndexOf("\\");
document.forms["add_software"].Image_name.value=(Img.substring(b+1));

data1 = document.forms["add_software"].Data1.value;
data2 = document.forms["add_software"].Data2.value;
data3 = document.forms["add_software"].Data3.value;
document.forms["add_software"].Date.value = (data1 + "-" + data2 + "-" + data3);

document.forms["add_software"].action="edit_software_action.php";
document.forms["add_software"].submit();
}
function Change_field_news(Subscribe) {

data1 = document.forms["add_software"].Data1.value;
data2 = document.forms["add_software"].Data2.value;
data3 = document.forms["add_software"].Data3.value;
document.forms["add_software"].Date.value = (data1 + "-" + data2 + "-" + data3);

document.forms["add_software"].action="add_news_action.php";
document.forms["add_software"].submit();
}