function setLang ( lang ) {
    var host = window.location.host ;
    var path = window.location.pathname ;
    var search = window.location.search ;
    var exdate = new Date() ;
    exdate.setDate( exdate.getDate() + 999 ) ;
    document.cookie = 
      ( "vishayln=" 
      + escape( lang )
      + ";expires="
      + exdate.toGMTString()
      + ";path=/;"
      ) ;
    //window.location = ( "http://" + host + "/setlang?lang=" + lang + "&url=" + path + search ) ;
    //window.location = ( "http://" + host + path + search ) ;
    window.location.reload(true);
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


