function GotoPageID(id){
	 top.location.href = 'base.php'+CurParam+'lid='+nLangID+'&id='+id;
}
function GotoPageTop(id){
	 top.location.href = 'base.php'+CurParam+'lid='+nLangID+'&top='+id;
}
//function SearchWin(){
//		window.open('../tpl_php/popup_search.php?nID='+nID+'&CurParm='+CurParam+'&nLangID='+nLangID,'pu_search','width=250,height=200,resizable=no,scrollbars=no');
//}
function ZoomImage(i){
	//if (i.substr(i.length-4,4).toLowerCase() == '.jpg'){
		PopUp('../tpl_php/popup_zoom.php?img='+i,600,500,1,0);
	//}
}
function PopUp(u,w,h,s,tb){
		var l = (((screen.width)/2)-(w/2))-15;
        var t = (((screen.height)/2)-(h/2))+15;
		var o = 'toolbar='+tb+',top='+t+',left='+l+',scrollbars='+s+', resizable='+s+' , height='+h+' ,width='+w;
        var pw = window.open(u, "popup", o);
		pw.focus();
}
function newWin(u){
	if (u!=''){
	window.open(u);
	}
}
//function ZoomIcon(image){
//	if (image.substr(image.length-4,4) == '.jpg'){
	//	document.write('<img src="../assets/gfx/zoom.gif" alt="zoom" width="15" height="15" align="right" onClick="javascript: ZoomImage(\''+image+'\')">');
	//}
//}
function SearchSite(q,sa){
	if (sa){
		qid = 1;
	}else{
		qid = nID;
	}
//alert('base.php'+CurParam+'lid='+nLangID+'&id='+nID+'&qid='+qid+'&q='+q);
top.location.href = 'base.php'+CurParam+'lid='+nLangID+'&id='+nID+'&qid='+qid+'&q='+q;
//window.location.href = "base.php<? print( 'base.php' . $CurParam . 'id=' . $nID .'&lid='.$nLangID ) ?>&qid=<? print($nID) ?>&q='+document.sqfrm.sqtxt.value"
return false;
}
function SearchPromt(q){
	s = prompt(q,getCookie('searchstr'));
	if (s!=null){
	if(s!=""){
		setCookie('searchstr',s)
		SearchSite(s,0);
	}
	}
}
//base.php<? print( $CurParam . 'id='.$nID.'&lid='.$nLangID.'&layout=print' ) ?>
function openPrintPage() {
	top.location.href = top.location.href + '&layout=print';
}
function printPage() {
  if (window.print){
    window.print();
	onfocus=closePrint;
  }
}
function closePrint(){
   onfocus=null;
   setTimeout("history.back()",500);
}
function setCookie(n,v){
    var ablauf = new Date();
	ablauf.setTime(ablauf.getTime() + (5 * 86400000)); // 5Tage
	document.cookie = n + "=" + escape(v) +"; expires=" + ablauf.toGMTString();

}
function getCookie(name)
{
    var dc = document.cookie;
    var name = name + "=";
    var s = dc.indexOf("; " + name);
    if (s == -1){
        s = dc.indexOf(name);
        if (s != 0) return "";
    }else{
        s += 2;
    }
    var e = document.cookie.indexOf(";", s);
    if (e == -1){
        e = dc.length;
    }
    return unescape(dc.substring(s + name.length, e));
}
// Flashcheck
var fa = "";
function fchk() {
	setCookie("flash","ok");
	top.location.href = 'base.php'+CurParam+'lid='+nLangID+'&id='+nID;
}
function falert(a) {
	// ignore when flashblock used
	if (getCookie("flash") != "ok" && (document.getElementById('flashnavo') || document.getElementById('flashnave')) ) {
	//if (getCookie("flash") != "ok") {
		var x = confirm(fa);
		if(x) top.location.href = top.location.href = 'base.php'+CurParam+'lid='+nLangID+'&id='+nID+'&noflash=1';
	}
}
function chkFlash(a){
	if (getCookie("flash") != "ok" && (document.getElementById('flashnavo') || document.getElementById('flashnave')) ){
	//if (getCookie("flash") != "ok"){
		fa = a;
		window.setTimeout('falert()',6000);
	}
}