/////////////////	onload	/////////////////
window.onload = function (){
var allA = document.getElementById('main').getElementsByTagName('a');
	for(var i=0;i<allA.length;i++){
		allA[i].onmouseover = function (){window.status = this.title;return true}
		allA[i].onmouseout = function (){window.status = '';return true}
	}


window.moveTo(0,0);
if(document.all){
	window.resizeTo(screen.availWidth, screen.availHeight);
}else if(document.layers || document.getElementById){
	if(window.outerHeight < screen.availHeight || window.outerWidth < screen.availWidth){
		window.outerHeight = screen.availHeight;
		window.outerWidth = screen.availWidth;
	}
}

};

/////////////////	end onload	/////////////////

var win=null;
function popWindow(mypage,myname,w,h,scroll){

LeftPosition=(screen.width)?(screen.width-w)/2:100;
TopPosition=(screen.height)?(screen.height-h)/2:100;

settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);

};

/////////////

function isEmail(string){
	if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1){
		return true;
	}else{
		return false;
	}
};

function capitalize(obj){
	val = obj.value;
	newVal = '';
	val = val.split(' ');
	for(var c=0; c < val.length; c++){
		newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length) + ' ';
	}
	obj.value = newVal;
};

/////////////

function doSelected(x, y){
	
	var select_box = document.getElementById(y);

	for(i = 0 ; i < select_box.length ; i++){
		if(select_box.options[i].value == x){
		select_box.options[i].selected="selected";
		}
	}
};

//////

function langSubmit(action){
	document.getElementById('langForm').langSel.value = action;
	document.getElementById('langForm').submit();
};

//////product nav

var productsOn = false;
var allSub = 4;

function productsHandle(){
var pNav = document.getElementById('productsNav');
var pSubNav = document.getElementById('pSubNav');

	if(productsOn == true){
		pNav.className = 'pOff';
		pSubNav.className = 'subOff';
		productsOn = false;
	}else{
		pNav.className = 'pOn';
		pSubNav.className = 'subOn';
		productsOn = true;
	}

for(var i = 1;i <= allSub; i++){
	document.getElementById('more'+ i).className = 'moreOff';
};	//for

var allUl = document.getElementById('subArea').getElementsByTagName('ul');
	for(var i = 0;i < allUl.length; i++){
		allUl[i].className = 'off';
	};	//for

};

function subHandle(id){

for(var i = 1;i <= allSub; i++){
	if(i != id){
		document.getElementById('more'+ i).className = 'moreOff';
	}else{
		document.getElementById('more'+ i).className = 'moreOn';
	}
};	//for

var allUl = document.getElementById('subArea').getElementsByTagName('ul');
	for(var i = 0;i < allUl.length; i++){
		if(i != id-1){
			allUl[i].className = 'off';
		}else{
			allUl[i].className = 'on';
		}
	};	//for

};

//////