// JavaScript Document

// start print option
function printSelection(node){

  var content=node.innerHTML
  var pwin=window.open('','print_content','width=500,height=650');

  pwin.document.open();
  pwin.document.write('<html><body onload="window.print()">'+content+'</body></html>');
  pwin.document.close();
 
  setTimeout(function(){pwin.close();},6000);

}
//end print option


//start font option

function fs1(n, w) {
document.getElementById('font_change1').style.fontSize = n;
document.getElementById('font_change1').style.fontWeight = w;
var fontLink = document.getElementById('font_change1').getElementsByTagName('a');
for(var i=0; i<fontLink.length; i++) {
	document.getElementById('font_change1').getElementsByTagName('a')[i].style.fontSize = '14px';
	document.getElementById('font_change1').getElementsByTagName('a')[i].style.fontWeight = w;}
}

function fs2(n, w) {
document.getElementById('font_change2').style.fontSize = n;
document.getElementById('font_change2').style.fontWeight = w;
var fontLink = document.getElementById('font_change2').getElementsByTagName('a');
for(var i=0; i<fontLink.length; i++) {
	document.getElementById('font_change2').getElementsByTagName('a')[i].style.fontSize = '14px';
	document.getElementById('font_change2').getElementsByTagName('a')[i].style.fontWeight = w;}
}

function fs3(n, w) {
document.getElementById('font_change3').style.fontSize = n;
document.getElementById('font_change3').style.fontWeight = w;
var fontLink = document.getElementById('font_change3').getElementsByTagName('a');
for(var i=0; i<fontLink.length; i++) {
	document.getElementById('font_change3').getElementsByTagName('a')[i].style.fontSize = '14px';
	document.getElementById('font_change3').getElementsByTagName('a')[i].style.fontWeight = w;}
}

function fs4(n, w) {
document.getElementById('font_change4').style.fontSize = n;
document.getElementById('font_change4').style.fontWeight = w;
var fontLink = document.getElementById('font_change4').getElementsByTagName('a');
for(var i=0; i<fontLink.length; i++) {
	document.getElementById('font_change4').getElementsByTagName('a')[i].style.fontSize = '14px';
	document.getElementById('font_change4').getElementsByTagName('a')[i].style.fontWeight = w;}
}
function fs5(n, w) {
document.getElementById('font_change5').style.fontSize = n;
document.getElementById('font_change5').style.fontWeight = w;
var fontLink = document.getElementById('font_change5').getElementsByTagName('a');
for(var i=0; i<fontLink.length; i++) {
	document.getElementById('font_change5').getElementsByTagName('a')[i].style.fontSize = '14px';
	document.getElementById('font_change5').getElementsByTagName('a')[i].style.fontWeight = w;}
}
// creaza link ptr. cautare
function change_url() {
document.location = "http://www.semnificatia-viselor.ro/interpretare/"+document.form1.text1.value;
}
// elimina textul din casuta de cautare

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

// tasta enter inactiva
function stopRKey(evt) { 
  var evt = (evt) ? evt : ((event) ? event : null); 
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); 
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;} 
} 

document.onkeypress = stopRKey; 



