// tbl_krauta.js

document.write('<script language="javascript" src="/static/tablemap.js"></script>');
 
var tbl_path = new Array(); 

function NavLightIte(title, url, target)
{
	this.title = title; // txt, otskko
	this.url = url.replace("&MENU_1_open=false","&MENU_1_open=true") + '&pid='+strCurPrtId+'&layout='+strCurLayout;  
	this.target = target;
}					



function handleDiv(path,obj,html, top, left, visib)
{
	var txt= '', style = '';

		if (document.layers)
		{
			txt= path+ 'document.layers["' + obj + '"]';
			dom = 	eval(txt);
			if (dom)
			{
				if (top!=-1)
					{
						dom.top = top;
					}	
				if (left!=-1)
					{
						dom.left = left;
					}
				if (html)	
				{
			 		dom.document.open()
					dom.document.write(html);
					dom.document.close();
				}	
				if (visib!=-1)	
				{	
					style=visib ? 'visible': 'hidden'; 
					dom.visibility= style;
				}	
				
				
				dom = null;
			}	
			
		}
		else if (document.all)
		{
				 
			 txt= path+ 'document.all.' + obj;
			 dom = 	eval(txt);

			 if (dom)
			 {
			 
			 	if (top!=-1)
					{
				
						dom.style.pixelTop = top;
					}	
				if (left!=-1)
					{
							
						dom.style.pixelLeft= left;
					}
			 	
				if (html)	
				{	
			 		dom.innerHTML= html;
				}	
				
				if (visib!=-1)	
				{	
					
					style=visib ? 'visible': 'hidden';
			 		dom.style.visibility= style;
				}	
				
				
				dom = null;
			 }	
		}	
		else  
		{
			 txt= path+ 'document.getElementById("' + obj + '")';
			 dom = 	eval(txt);
			
			 if (dom)
			 {
			 		
			 	if (top!=-1)
					{
						dom.style.top= top;
					}	
				if (left!=-1)
					{
						dom.style.left= left;
					}
				if (html)	
				{	
			 		dom.innerHTML= html;
				}	
				
				if (visib!=-1)	
				{	
			 
					style=visib ? 'visible': 'hidden';
					dom.style.visibility= style;
				}	
				
				dom = null;
			}	
			 
		}	
		
		
	 
		
}		




function getMouseOverEvents(over, out) 
{
	return ' onMouseover=" window.status=\'' + over.replace("'", " ") + '\'; return true;" onMouseout=" window.status=\'' + out.replace("'", " ") + '\'; return true;" ';
}

 
function replaceSp(txtM, txtT)
{
	var back=txtM.toString();
	var fn=txtT;
	var rp='';
	while (back.search(fn)>-1) 
		{ back=back.replace(fn,rp);	}
			
	return back;
}
 

function HandleprtName06(txt2)
{
 
	var f_lst = '1 2 3 4 5 6 7 8 9 0 _',  f_lstAr; 
	
	 var f_lstAr=f_lst.split(" ");
	for (var i = 0; i < f_lstAr.length; i++) 
	{
		// alert(txt2[i]); 
		txt2 = replaceSp(txt2, f_lstAr[i])
		
	}	
 //  alert(txt2);
	return txt2;  
}


function GetprtName06()
{
 
 return '<a class="breadcrumbStyle"  href="/index.asp?id=85A302E9100A43A0A13B8E80F5A4880E" target="_top">Etusivu&nbsp;>>&nbsp;' + '<a class="breadcrumbStyle"  href="/index.asp?id='+strCurPrtId+'" target="_top">' + HandleprtName06(strPortalName)+ '&nbsp;>>&nbsp;'; 
}


//breadcrumb

function get_update_On_table_path()
{
	if (get_update_On_table_path.arguments.length==0)
		{  setTimeout('get_update_On_table_path(true)',100); }

	else
		{	
	 
		 
			var html = new Array();		
	 		html[html.length] = '<nobr>';
			html[html.length] = GetprtName06(); 
			
			
			if ( tbl_path.length ) 
				for (var i = 0; i < tbl_path.length; i++) 
					html[html.length] = '<a class="breadcrumbStyle'+(((i+1)==tbl_path.length)?'Active':'')+'"  href="'+ tbl_path[i].url+ '" target="'+ tbl_path[i].target+ '" '+getMouseOverEvents(tbl_path[i].title,'')+'>'+tbl_path[i].title+'&nbsp;>>&nbsp;';
					//					html[html.length] = '<a class="breadcrumbStyle'+(((i+1)==tbl_path.length)?'Active':'')+'"  href="'+ tbl_path[i].url+ '" target="'+ tbl_path[i].target+ '" '+getMouseOverEvents(tbl_path[i].title,'')+'>'+tbl_path[i].title+'</a><img src="/layout/commonimg06/arrow_breadcrumb.gif" width="5" height="5" border="1" hspace="5">';
				
			html[html.length] = '</nobr>';
	 
			var txt = html.join("");
			html = null;
			handleDiv('','breadcrumb',txt,-1,-1,-1);			 
 
			
		}
		
			
}

function CreateColorPanelIdCOnf()
{
	var ptmp= new Array();
		ptmp['140407965C2347E1B07B5157E58728E6'] ='140407965C2347E1B07B5157E58728E6';  
		ptmp['23978B553DEA4E13B29200C61F0CE318'] ='23978B553DEA4E13B29200C61F0CE318';  
		ptmp['5E9EFDBDEBA148FAB914DBD5FF0325C0'] ='5E9EFDBDEBA148FAB914DBD5FF0325C0';  		
		ptmp['638E5229D38C4318BF4D87BAB4537CE8'] ='638E5229D38C4318BF4D87BAB4537CE8';  		
		ptmp['761ECBD0D309466287D1A0650A559037'] ='761ECBD0D309466287D1A0650A559037';  		
		ptmp['824C2A7AF1C840A781AC3776BBD1B6CA'] ='824C2A7AF1C840A781AC3776BBD1B6CA';  		
		ptmp['DC20E8AA1D794B70A43E016EA27BA5CF'] ='DC20E8AA1D794B70A43E016EA27BA5CF';  		
		ptmp['E01CB6E6E52E4B16A567E560D727A827'] ='E01CB6E6E52E4B16A567E560D727A827';  		
		ptmp['E2C41A4699A74220B471BECD31C4D46F'] ='E2C41A4699A74220B471BECD31C4D46F';  		
		// local
		ptmp['EA393203F8DF43A0B087297AA98EA910'] ='824C2A7AF1C840A781AC3776BBD1B6CA	';  		
	return ptmp; 
}


function printColorPanel()
{
	var tmpImg = '23978B553DEA4E13B29200C61F0CE318.gif'; 
	if (strCurPrtId)
	{
		 var prtIdAr= new CreateColorPanelIdCOnf();
		
		if (prtIdAr[strCurPrtId])
			tmpImg = prtIdAr[strCurPrtId] + '.gif';
		
		prtIdAr = null; 
	}

 document.write('<td width="100%" valign="top" style="background-image: url(/layout/commonimages/varipalkit/'+tmpImg+'); background-repeat: no-repeat; height: 14px;"></td>'); 			
	
}



function tbl_select_launch(url)
{
	 ((url.length)?((url.indexOf("trgtIs=_blank")>0)? window.open(url) : window.top.location.href=url ):void(0));
}





function DrawKrautaSelect06()
{
 
var ht = new Array();
 /*
ht[ht.length] = '<div style="position: absolute; top: 50px; left: 387px;"><form><select style="width: 252px; "  onChange="tbl_select_launch(this.options[selectedIndex].value);">';
ht[ht.length] = '<option value="">Näytä kaikki </option>';
ht[ht.length] = '<option value="http://www.k-rauta.com/?trgtIs=_blank">www.k-rauta.com  </option>';
ht[ht.length] = '</select></form></div>';*/
//
ht[ht.length] = '<div style="position: absolute; top: 35px; left: 660px;"><form name="haku" action="/modules/search/default.asp" method="GET"><table border="0" cellpadding="0" cellspacing="0" width="200">';
ht[ht.length] = '<tr><td colspan="2"><img src="/layout/krauta2006_sisa/images/search_txt.gif" alt="Haku"><br/></td></tr>';
ht[ht.length] = '<tr><td width="100"><input type="text" name="txtSearchSpec" id="" value="" size="15"></td><td><input type="image" src="/layout/krauta2006_sisa/images/but_hae.gif" alt="HAE" value="HAE"><input type="hidden" name="tabletarget" value="data_1" class="">';
ht[ht.length] = '<input type="hidden" name="pid" value="638E5229D38C4318BF4D87BAB4537CE8" class=""><input type="hidden" name="layout" value="krauta2006_sisa" class=""></td></tr>';
ht[ht.length] = '</table></form></div>';

 

ht[ht.length] = '<div id="txtSizeDiv" style="position: absolute; top: 95px; left: 820px;">';

	  var cookie = readCookie("style");
	  if (cookie==null || cookie=='normal') 	
	  	cookie='normal'
	  else 
		 cookie='bigger';
	  ht[ht.length] = GetSwatTextHtml(cookie); 
	  
ht[ht.length] = '</div>';

var txt = ht.join("");
ht = null;
 
document.write(txt); 
}

function printSearchBoxFrontpage()
{

var ht = new Array();
 
ht[ht.length] = '<div style="position: absolute; top: 22px; left: 400px;"><form name="haku" action="/modules/search/default.asp" method="GET"><table border="0" cellpadding="0" cellspacing="0" width="220">';
ht[ht.length] = '<tr><td width="50"><img src="/layout/krauta2006_sisa/images/search_txt.gif" alt="Haku"><br/></td>';
ht[ht.length] = '<td width="100"><input type="text" name="txtSearchSpec" id="" value="" size="20"></td><td width="70" align="center"><input type="image" src="/layout/krauta2006_sisa/images/but_hae.gif" alt="HAE" value="HAE"><input type="hidden" name="tabletarget" value="data_1" class="">';
ht[ht.length] = '<input type="hidden" name="pid" value="638E5229D38C4318BF4D87BAB4537CE8" class=""><input type="hidden" name="layout" value="krauta2006_sisa" class=""></td></tr>';
ht[ht.length] = '</table></form></div>';
/*
ht[ht.length] = '<div id="txtSizeDiv" style="position: absolute; top: 106px; left: 657px;">';

	  var cookie = readCookie("style");
	  if (cookie==null || cookie=='normal') 	
	  	cookie='normal'
	  else 
		 cookie='bigger';
	  ht[ht.length] = GetSwatTextHtml(cookie); 
	  
ht[ht.length] = '</div>';
*/



var txt = ht.join("");
ht = null;
 
document.write(txt); 

}


/* 08 */ 


function printSearchBoxFrontpage08()
{

var ht = new Array();
 
ht[ht.length] = '<div style="position: absolute; top: 1px; left: 200px;"><form name="haku" action="/modules/search/default.asp" method="GET"><table border="0" cellpadding="0" cellspacing="0" width="220">';
ht[ht.length] = '<tr><td width="70" valign="top" style="padding-top: 3px;padding-right: 5px;"><span style="FONT-WEIGHT: bold;	FONT-SIZE: 10px;	COLOR: #000000;	FONT-FAMILY: Arial, Helvetica, sans-serif;	TEXT-DECORATION: none">HAKU:</span><br/></td>';
ht[ht.length] = '<td width="100"><input type="text" name="txtSearchSpec" id="" value="" size="20" style="height: 20px;"></td><td width="70" align="center"><input type="image" src="/layout/krauta2008/images/search_btn2.gif" alt="HAE" value="HAE"><input type="hidden" name="tabletarget" value="data_1" class="">';
ht[ht.length] = '<input type="hidden" name="pid" value="638E5229D38C4318BF4D87BAB4537CE8" class=""><input type="hidden" name="layout" value="krauta2006_sisa" class=""></td></tr>';
ht[ht.length] = '</table></form></div>';

 



var txt = ht.join("");
ht = null;
 
document.write(txt); 

}

/* 08 */














function setActiveStyleSheet(title) {

 
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

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;
}
	
 
window.onload = function(e) {
  var cookie = readCookie("style");
  if(cookie=='null') cookie='normal';
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
  
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
 
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
if(cookie=='null') cookie='normal';
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);

function GetSwatTextHtml(title2)
{
	return '<a href="javascript:ChangeTextSize();"><img src="/layout/krauta2006_sisa/images/'+(title2=='normal' ? 'but_enlarge_txt' : 'but_shrink_txt')+'.gif" alt="' + (title2=='normal' ? 'Suurenna tekstiä' : 'Pienennä tekstiä') + '" border="0"></a>'; 
}
function swapTextImage(title2)
{
	 handleDiv('','txtSizeDiv',GetSwatTextHtml(title2), -1, -1, -1);
} 

function ChangeTextSize()
{
 
	  var title2 = getActiveStyleSheet();
	  if (title2==null || title2=='normal') 	
	  	title2='bigger'
	  else 
		 title2='normal';

	 setActiveStyleSheet(title2);
	 swapTextImage(title2);
	  
}


function printFooter06()
{
var ht = new Array();
 
ht[ht.length] = '<style>';
ht[ht.length] = ' a.paamenuLnk2:link {font-family:Arial, Helvetica, sans-serif; font-size:10px; font-weight:normal; color:#FFCF00;text-decoration: none; }';
ht[ht.length] = 'a.paamenuLnk2:visited {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:hover {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:active {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = '</style>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/index.asp?id=2BB8F577659B4662A0D2DFF50D322310&data=1,00308B787886459385F296A5AFD4FA74,5DB02C16B0474D61BA7D9BD1BBCF8D7E&tabletarget=data_2&laytmp=krauta2008" target="_top">REKISTERISELOSTE</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/index.asp?id=62C0A3445DE644C1B64CD25C6932AF3E" target="_top">REKRYTOINTI</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=DF9857C55111496282BF176F558E279D&tabletarget=data_1&pid=E201E93A9E454D50A09A21023C9D143A&layout=krauta2006_sisa" target="_top">TARJOUSPYYNTÖ</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=F2BB2A48D0D646AFA017512AD4579E77&tabletarget=data_1&pid=E201E93A9E454D50A09A21023C9D143A&layout=krauta2006_sisa" target="_top">PALAUTE</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/sitemap/default.asp?tabletarget=data_1&pid=2BB8F577659B4662A0D2DFF50D322310&layout=krauta2006_sisa&shmap=E01CB6E6E52E4B16A567E560D727A827,638E5229D38C4318BF4D87BAB4537CE8,23978B553DEA4E13B29200C61F0CE318,DC20E8AA1D794B70A43E016EA27BA5CF,140407965C2347E1B07B5157E58728E6,140407965C2347E1B07B5157E58728E6,5E9EFDBDEBA148FAB914DBD5FF0325C0,761ECBD0D309466287D1A0650A559037,824C2A7AF1C840A781AC3776BBD1B6CA,95D2A1C7BD7C4B2797F8F93A78684B1F,2BB8F577659B4662A0D2DFF50D322310,E201E93A9E454D50A09A21023C9D143A,89F07C0AA8914258AE498B97A1A33B13,5A6C3544584A466F9BA5803A4199A94B,62C0A3445DE644C1B64CD25C6932AF3E" target="_top">SIVUKARTTA</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a class="paamenuLnk2" href="javascript:window.print();">TULOSTA SIVU</a></td>';
var txt = ht.join("");
ht = null;
 
document.write(txt); 


}

function printFooter06Kauppias()
{
var ht = new Array();
 
ht[ht.length] = '<style>';
ht[ht.length] = ' a.paamenuLnk2:link {font-family:Arial, Helvetica, sans-serif; font-size:10px; font-weight:normal; color:#FFCF00;text-decoration: none; }';
ht[ht.length] = 'a.paamenuLnk2:visited {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:hover {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:active {	text-decoration: none; color:#FFCF00;}';
ht[ht.length] = '</style>';
ht[ht.length] = '<td class="alamenu" valign="baseline"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/index.asp?id=62C0A3445DE644C1B64CD25C6932AF3E" target="_top">REKRYTOINTI</a></td>';
ht[ht.length] = '<td class="alamenu" valign="baseline"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=DF9857C55111496282BF176F558E279D&tabletarget=data_1&pid='+strCurPrtId+'&layout=krauta2006_kauppias" target="_top">TARJOUSPYYNTÖ</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=F2BB2A48D0D646AFA017512AD4579E77&tabletarget=data_1&pid='+strCurPrtId+'&layout=krauta2006_kauppias" target="_top">PALAUTE</a></td>';
var txt = ht.join("");
ht = null;
 
   				
				
 
document.write(txt); 


}  

function printHeader06Kauppias()
{
var ht = new Array();
 
ht[ht.length] = '<style>';
ht[ht.length] = 'a.paamenuLnk2:link {font-family:Arial, Helvetica, sans-serif; font-size:10px; font-weight:normal; color:#FFCF00;text-decoration: none; }';
ht[ht.length] = 'a.paamenuLnk2:visited {text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:hover {text-decoration: none; color:#FFCF00;}';
ht[ht.length] = 'a.paamenuLnk2:active {text-decoration: none; color:#FFCF00;}';
ht[ht.length] = '</style>';
ht[ht.length] = '<td class="alamenu" valign="baseline"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/index.asp?id=62C0A3445DE644C1B64CD25C6932AF3E" target="_top">REKRYTOINTI</a></td>';
ht[ht.length] = '<td class="alamenu" valign="baseline"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=DF9857C55111496282BF176F558E279D&tabletarget=data_1&pid='+strCurPrtId+'&layout=krauta2006_kauppias" target="_top">TARJOUSPYYNTÖ</a></td>';
ht[ht.length] = '<td class="alamenu"><img src="/layout/krauta2006_kauppias/images/footernuoli.gif" width="14" height="13" alt="" border="0" hspace="5"/></td><td valign="middle" class="alamenu"><a  class="paamenuLnk2"  href="http://www.k-rauta.com/modules/external/show_link.asp?id=F2BB2A48D0D646AFA017512AD4579E77&tabletarget=data_1&pid='+strCurPrtId+'&layout=krauta2006_kauppias" target="_top">PALAUTE</a></td>';
var txt = ht.join("");
ht = null;
 
   				
				
 
document.write(txt);


}


function Snoop(strPagesetName,strPagename) {
	var strHost;
	strHost = window.location.host;
	strHost= strHost.toLowerCase();
	strHref=document.location.href.toLowerCase();


	var blnSnoop =true;

	re = /index.asp/i;               //Create regular expression pattern.
	r = strHref.search(re);            //Search the string.

	

	strPagesetName = strPagesetName;
	strPagename = strPagename;
	
	// TUTKITAAN, ONKO PORTAALIN AVAUS
	if ((r>0) && (strPagesetName=='') && (strPagename=='')) {
		//PORTAALIN AVAUS JOS URLISSA INDEX.ASP JA PARAMETRIT TYHJIÄ.
		// TÄNNE TULLAAN VAIN TAULUKKOLEISKAN OLLESSA KYSEESSÄ ?
		strPagesetName ="PORTAALI";

		strPagename = strPortalName;						
		blnSnoop =true;
	}else {
		//alert(r + '|' + strPagesetName + '|'+ strPagename);
		
		//URLISSA EI INDEX.ASPia
		if ((r=-1) && ((strPagesetName=='') || (strPagename==''))) {
			
			blnSnoop = false;
		}
	}

	strPagename = strPagesetName + " - " + strPagename;

	if (typeof(window.top.strPortalName)!='undefined') {
		strPortal = window.top.strPortalName;
	}else{
		strPortal ="Ei määritelty";
	}
	
	strPortal = encodeEntities(strPortal);
	strPagename = encodeEntities(strPagename);
	
	//if ((strHost=='www.k-rauta.com') || (strHost=='www.rautia.fi')) {


	if (blnSnoop) {
		if ((strHost=='www.k-rauta.com') || (strHost=='www.k-rauta.fi') || (strHost=='www.k-rauta.net') ) {
		
			DoSnoop("krauta_fi", strPagename, strPortal);		

		}else{

			if ((strHost=='www.rautia.fi') || (strHost=='www.rautia.net') || (strHost=='www.rautia.com')) {	
			//if ((strHost=='www.rautia.fi') || (strHost=='www.rautia.net') || (strHost=='www.rautia.com')) {

				DoSnoop("rautia_fi", strPagename, strPortal);
	
			}else{
				if (strHost=='devkrautainternet') {
					DoSnoop("devkrauta", strPagename, strPortal);					
				}
			}
		}
	}

}

function DoSnoop(strTili, strPagename, strPortal) {
//	alert(strTili + ' ' + strPagename + ' ' + strPortal);

	if (strTili!='') {
//		alert("src='http://eu1.snoobi.com/snoop.php?tili=" + strTili + "&page_name="+strPagename+"&section="+strPortal+"'></script>");
		strSrc = ("http://eu1.snoobi.com/snoop.php?tili=" + strTili + "&page_name="+strPagename+"&section="+strPortal);
		
		//strSrc=encodeEntities(strSrc);

		//strSrc = encodeURI(strSrc);
	
		//ShowErrorDialog(strSrc);
		//alert(escape("http://eu1.snoobi.com/snoop.php?tili=" + strTili + "&page_name="+strPagename+"&section="+strPortal));
		document.write("<!-- BEGIN Snoobi v1.2 -->");
		document.write("<script language='JavaScript1.2' ");
		document.write("src='"+ strSrc +"'></script>");
		document.write("<!-- END Snoobi v1.2 -->");
	}
}

function encodeEntities(strString) {
	var strS='',i,intCharEnt;

	for (i=0;i<=strString.length-1;i++) {

		intCharEnt = strString.charCodeAt(i);
		if (intCharEnt>=192) {
			strS +=	"&#"+intCharEnt + ";";
		}else{
			strS += strString.charAt(i);
		}
		
	}

	return strS;
	
}



// mika pajarinen, 16.03.2004  
function openFlashPopUp(id) 
{

	window.open('/flashFrame.asp?Id=' + id,'help'+id,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=700');
	//window.top.kRautaFlashPopup.focus();
}	
 
 // ' mika pajarinen, 17.01.2005, kuvien popup-toiminto
var popupwindow2005;
popupwindow2005 = null;
function popPopup(x) 
{
    var strF;

    strF = "toolbar=no"
    strF = strF + ",location=no"
    strF = strF + ",directories=no"
    strF = strF + ",status=no"
    strF = strF + ",menubar=no"
    strF = strF + ",scrollbars=no"
    strF = strF + ",resizable=no"


    popupwindow2005=window.open('','popupwindow2005',strF);

    if ( navigator.appCodeName.indexOf("Mozilla") != -1 && (navigator.appVersion.charAt(0) > 2 || navigator.appVersion.charAt(1) != '.') )
    {
     	popupwindow2005.focus();
    }
	popupwindow2005.location.href=x;
}


function openpicture(guid)
{
	if (guid)	popPopup("/modules/image/showpopupimage.asp?id=" + guid );
}
/////////////////////////////////////////////////////


function drawRekryReleaseLnk(x, Ltxt)
{

//if (Lurl.toLowerCase().indexOf("tabletarget=data_1")==0)
	x+='&tabletarget=data_1';
	
document.write('<a class="tiedotesisalto" href="'+x+'">'+Ltxt+'</a>');

		 
}



var puuautoWindow;
puuautoWindow = null;
function openPuuAutoPopup(action)
{
	//puuautoWindow = window.open('/flashFrame.asp?Id=' + id,'help'+id,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=700');
// PUUAUTO_YLEISOKILPAILU.asp
 

	/*
	 puuautoWindow=window.open('','puuautoWindow07','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=700');
	  if ( navigator.appCodeName.indexOf("Mozilla") != -1 && (navigator.appVersion.charAt(0) > 2 || navigator.appVersion.charAt(1) != '.') )
    { 
  
		
		
    }
*/

 
	puuautoWindow=window.open('','puuautoWindow07','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=700');
   	puuautoWindow.focus();
	if (action==1)
		puuautoWindow.location.href="/static/PUUAUTO_YLEISOKILPAILU.asp";
		
	if (action==2)
		puuautoWindow.location.href="/static/PUUAUTO_KOULUKILPAILU.asp";
	

	
	// popupwindow2005.location.href=x;
	

}

//if (("" + document.location + "").toLowerCase().indexOf("index.asp?id=")!=-1 && ("" + document.location + "").toLowerCase().indexOf("data=")==-1 ) 
//if (("" + document.location + "").toLowerCase().indexOf("index.asp?id=")!=-1  && Snoop) 
//	 Snoop('','');

 
 
 
 
 
 
 
var popupFlashwindow08;
popupFlashwindow08 = null;

function popLinkFlash08(x) {
    var strF;

    strF = "toolbar=no"
    strF = strF + ",location=no"
    strF = strF + ",directories=no"
    strF = strF + ",status=no"
    strF = strF + ",menubar=no"
    strF = strF + ",scrollbars=no"
    strF = strF + ",resizable=no"
    strF = strF + ",WIDTH=350"
    strF = strF + ",HEIGHT=280"		
	

    popupFlashwindow08=window.open('','popupwindow',strF);

    if ( navigator.appCodeName.indexOf("Mozilla") != -1 && (navigator.appVersion.charAt(0) > 2 || navigator.appVersion.charAt(1) != '.') )
    {
     	popupFlashwindow08.focus();
    }
	popupFlashwindow08.location.href=x;
};
 
 
 
 
 
 
 
 

