function o(id){	return document.getElementById(id);}function changeAction (frm)	{		var elso 	= frm.ki.value.split('-'),			masodik = frm.kivel.value.split('-'),			id1		= elso[0],			id2		= masodik[0],			url1	= elso[1],			url2	= masodik[1],			link	= "";						id1>id2 ? link = url2+"-"+url1 : link = url1+"-"+url2;			frm.action = 'parhoroszkop/'+link; 		frm.submit(); return;	}	function changeAction2 (frm)	{		var elso 	= frm.ki.value,			masodik = frm.kivel.value;			if(elso!='')		{			if(masodik!='')			{				frm.action = 'parhoroszkop/'+elso+'-'+masodik; 				frm.submit(); return;			}			else			{				alert('Add meg a párod nevét!');				return false;			}						}		else 		{			alert('Add meg a neved!');			return false;		}	}	function trim(s){    var l=0; var r=s.length -1;    while(l < s.length && s[l] == ' ')    {     l++; }    while(r > l && s[r] == ' ')    {     r-=1;     }    return s.substring(l, r+1);} function compatcalc(frm) {	nameone = frm.ki.value.toUpperCase();	nameonelength = frm.ki.value.length;	nametwo = frm.kivel.value.toUpperCase();	nametwolength = frm.kivel.value.length;	var LoveValue=0;	if (trim(nameone).length <= 0) {		alert("Add meg a neved!");		return false;	}	if (trim(nametwo).length <= 0) {		alert("Add meg a párod nevét!");		return false;	}	for (Count=0; Count < nameonelength; Count++) {		letter1=nameone.substring(Count,Count+1);				if (letter1=='A') LoveValue+=0.5;		if (letter1=='B') LoveValue+=0.5;		if (letter1=='C') LoveValue+=0.5;		if (letter1=='D') LoveValue+=0.5;		if (letter1=='E') LoveValue+=2;		if (letter1=='F') LoveValue+=0.5;		if (letter1=='G') LoveValue+=0.5;		if (letter1=='H') LoveValue+=0.5;		if (letter1=='I') LoveValue+=0.5;		if (letter1=='J') LoveValue+=0.5;		if (letter1=='K') LoveValue+=0.5;		if (letter1=='L') LoveValue+=2;		if (letter1=='M') LoveValue+=0.5;		if (letter1=='N') LoveValue+=0.5;		if (letter1=='O') LoveValue+=2;		if (letter1=='P') LoveValue+=0.5;		if (letter1=='Q') LoveValue+=0.5;		if (letter1=='R') LoveValue+=0.5;		if (letter1=='S') LoveValue+=0.5;		if (letter1=='T') LoveValue+=0.5;		if (letter1=='U') LoveValue+=0.5;		if (letter1=='V') LoveValue+=2;		if (letter1=='W') LoveValue+=0.5;		if (letter1=='X') LoveValue+=0.5;		if (letter1=='Y') LoveValue+=0.5;		if (letter1=='Z') LoveValue+=0.5;	}	for (Count=0; Count < nametwolength; Count++) {			letter2=nametwo.substring(Count,Count+1);				if (letter2=='A') LoveValue+=0.5;		if (letter2=='B') LoveValue+=0.5;		if (letter2=='C') LoveValue+=0.5;		if (letter2=='D') LoveValue+=0.5;		if (letter2=='E') LoveValue+=2;		if (letter2=='F') LoveValue+=0.5;		if (letter2=='G') LoveValue+=0.5;		if (letter2=='H') LoveValue+=0.5;		if (letter2=='I') LoveValue+=0.5;		if (letter2=='J') LoveValue+=0.5;		if (letter2=='K') LoveValue+=0.5;		if (letter2=='L') LoveValue+=0.5;		if (letter2=='M') LoveValue+=0.5;		if (letter2=='N') LoveValue+=0.5;		if (letter2=='O') LoveValue+=0.5;		if (letter2=='P') LoveValue+=0.5;		if (letter2=='Q') LoveValue+=0.5;		if (letter2=='R') LoveValue+=2;		if (letter2=='S') LoveValue+=0.5;		if (letter2=='T') LoveValue+=2;		if (letter2=='U') LoveValue+=2;		if (letter2=='V') LoveValue+=0.5;		if (letter2=='W') LoveValue+=0.5;		if (letter2=='X') LoveValue+=0.5;		if (letter2=='Y') LoveValue+=0.5;		if (letter2=='Z') LoveValue+=0.5;	}	val=0;	if (LoveValue> 0) val=  5-((nameonelength+nametwolength)/2)	if (LoveValue> 2) val= 10-((nameonelength+nametwolength)/2)	if (LoveValue> 4) val= 20-((nameonelength+nametwolength)/2)	if (LoveValue> 6) val= 30-((nameonelength+nametwolength)/2)	if (LoveValue> 8) val= 40-((nameonelength+nametwolength)/2)	if (LoveValue>10) val= 50-((nameonelength+nametwolength)/2)	if (LoveValue>12) val= 60-((nameonelength+nametwolength)/2)	if (LoveValue>14) val= 70-((nameonelength+nametwolength)/2)	if (LoveValue>16) val= 80-((nameonelength+nametwolength)/2)	if (LoveValue>18) val= 90-((nameonelength+nametwolength)/2)	if (LoveValue>20) val=100-((nameonelength+nametwolength)/2)	if (LoveValue>22) val=110-((nameonelength+nametwolength)/2)	if (nameonelength==0 || nametwolength==0) val= "Err";	if (val < 0) val= 0;	if (val >99) val=99;	if(val!='')	{		frm.action = 'parhoroszkop/nev_egyezoseg'; 		frm.random.value=val;		frm.submit(); return;	}}function Copy(items){	var from_obj = o(from);	var to_obj = o(to);	for (i=0; i<items; i++)	{		to_obj.elements[i].value=from_obj.elements[i].value; 	}}//--------------------Onclick display on/off-----------------------------function Show(obj){	if(document.getElementById)	{	var el = document.getElementById(obj);		if(el.style.display == "none")		{			el.style.display = "block";		}		else		{			el.style.display = "none";		}	}}//--------------------Karbantartáshoz ablak-----------------------------function Services(Page){var newwin = window.open('','services','width=800,Height=600,directories=no,menubar=no,scrollbars=yes,resizable=no');newwin.document.write("<body></body>");var ww;var wh;if(window.innerWidth) 	{	ww=newwin.outerWidth;	wh=newwin.outerHeight;	} else	{	ww=newwin.document.body.clientWidth;	wh=newwin.document.body.clientHeight;	}var sw = screen.availWidth;var sh = screen.availHeight;newwin.moveTo(Math.round((sw-ww)/2),Math.round((sh-wh)/2));newwin.location.href = Page;return false;}
