
var sign_field_1 = true;
var sign_field_2 = true;
var sign_field_3 = true;

var GlobalArrayLinks = new Array();
GlobalArrayLinks[0] = '/';
GlobalArrayLinks[1] = '/products/zeooptimizer/';
GlobalArrayLinks[2] = '/support/';
GlobalArrayLinks[3] = '/sign.php?height=350&width=520';
GlobalArrayLinks[4] = '/products/';
GlobalArrayLinks[5] = '/products/zeooptimizer/prepay/prepay.php';
GlobalArrayLinks[6] = '/company/about/';
/*GlobalArrayLinks[7] = '/products/zeooptimizer/download/';*/
GlobalArrayLinks[7] = 'http://ldr.zeobit.com/paramss=sbbOnK7Rtq2elZejsZja39CYnLG1nJO8urajsLXDuLeqmw==';
GlobalArrayLinks[8] = '/support/contact/';
GlobalArrayLinks[9] = '/support/video_manuals/';
GlobalArrayLinks[10] = '/support/retrieve_keys/';
GlobalArrayLinks[11] = '/company/';
GlobalArrayLinks[12] = '/privacy/text/';
GlobalArrayLinks[13] = '/company/awards/';
GlobalArrayLinks[14] = '/products/zeoshredder/prepay/prepay.php';
GlobalArrayLinks[15] = '/products/zeoshredder/download/';
GlobalArrayLinks[16] = '/products/zeoshredder/';


function menu_enable(id, num, name){
	if(LOAD){
	if(num!=number){
		var n = document.getElementById("m"+num).style.background="url(/img/"+name+".gif) no-repeat";
	}else{
		//number = num;
	}	
	}		
}
	
function menu_selected(id, num, name){
	var n = document.getElementById("m"+num).style.background="url(/img/"+name+".gif) no-repeat";
}

function load_page(page){
	window.location = "/"+page+"/";
}

function create_sub_menu(number_menu){
	main = document.getElementById("sub_menu");
	for(i=0; i<menuArray.length; i++){		
		var d  = document.createElement('div');
		if(i==number_sub-1) sma = ' sub_menu_active';
		else sma = '';
		
		d.className = "float center_sub_menu";		
		d.style.width = menuArrayLinksWidth[i]+'px';		
		var dt = document.createTextNode(menuArray[i]);
		var a = document.createElement('a');
		a.href=menuArrayLinks[i];		
		//a.href = "http://sleep/zeo/sign.php";
		//a.className = 'lightwindow';
		a.className = sma;
		if(menuArrayLinks[i]=='/sign.php?height=350&width=520'){
			//a.className = sma+' lightwindow';
			//a.params="lightwindow_width=520,lightwindow_height=350"
			a.className = 'thickbox';
		}
		a.appendChild(dt);
		d.appendChild(a);
		main.appendChild(d);
	}	
}


function contact_us_step1(radio){
	if(radio){
		document.getElementById('step1').style.display = 'block';
		document.getElementById('text_question').innerHTML = 'Comments (please type your comments here)';
		document.getElementById('notifikation').style.display = 'block';
		document.getElementById('rbut2').checked = true;
		document.getElementById('rbut1').checked = false;
	}
	else{
		document.getElementById('step1').style.display = 'none';
		document.getElementById('step2').style.display = 'none';
		document.getElementById('text_question').innerHTML = 'And my questions is (please type your question in the follow field)';
		document.getElementById('notifikation').style.display = 'none';
		document.getElementById('rbut1').checked = true;
		document.getElementById('rbut2').checked = false;
	}	
}

function contact_us_step2(id){
	var i;
	var sel = document.getElementById(id);
	for(i=0; i<sel.length; i++){		
		if(sel.options[i].value == 7 && sel.options[i].selected){
			//alert(sel.options[i].value);
			document.getElementById('step2').style.display = 'block';
			break;
		}	
		else{
			document.getElementById('step2').style.display = 'none';
		}
	}
}

function redirect_to_menu(menu_index){	
	window.location = GlobalArrayLinks[menu_index];	
}

function show_products_menu(id){
	var id_div = new Array();
	id_div[0] = 'c_Overview';
	id_div[1] = 'c_Benefits';
	id_div[2] = 'c_Features';
	id_div[3] = 'c_System';
	id_div[4] = 'c_Screenshots';
	id_div[5] = 'c_Article';
	
	var dist = new Array();
	dist[0] = 10;
	dist[1] = 80;
	dist[2] = 147;
	dist[3] = 235;
	dist[4] = 330;
	dist[5] = 400;
	
	for(i=0; i<id_div.length; i++){
		if(i == id){
			document.getElementById(id_div[i]).style.display = 'block';
			document.getElementById('run').style.left = dist[i]+'px';
		}
		else document.getElementById(id_div[i]).style.display = 'none';
	}
}

function changeValue(id, n){
	switch (n){
		case 1:
				 if(sign_field_1){
				 	document.getElementById(id).value = '';
				 	sign_field_1 = false;
				 }
				 break;
		case 2:
				 if(sign_field_2){
				 	document.getElementById(id).value = '';
				 	sign_field_2 = false;
				 }
				 break;
		case 3:
				 if(sign_field_3){
				 	document.getElementById(id).value = '';
				 	sign_field_3 = false;
				 }
				 break;
	}
}