function openPortal() {
	myleft=20;
	mytop=20;
	settings="width=600,height=444,top="+ mytop +",left="+ myleft+",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,dependent=no";
	win=window.open("http://samsung.h852610.serverkompetenz.net/main.php?fldPage=portal","mypopup",settings);
	win.focus();
}

function openHaendler(){
	myleft=20;
	mytop=20;
	settings="width=750,height=444,top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,dependent=no";
	win=window.open("http://samsung.h852610.serverkompetenz.net/main.php?fldPage=hdl_search","mypopup",settings);
	win.focus();

}

function openPopup(id){
	myleft=20;
	mytop=20;
	settings="width=800,height=500,top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,dependent=no";
	win=window.open("index.php?id=" + id,"mypopup",settings);
	win.focus();

}

function openWebsite(url) {
	if(url) {
		window.open(url,'link','');
	}
}



function selectCameraserie(id, pid) {
	if(id) {
		// var tmp = fsFindObj("fldCameraserie").value = id;
		goCameraselector(pid);		
	}
}

function selectCamera(id, pid) {
	if(id) {
		// var tmp = fsFindObj("fldCamera").value = id;
		goCameraselector(pid);		
	}
}
function goCameraselector(pid) {
	fsSubmitForm("cameraselectorform", "index.php?id=" + pid);
}




function openImagedetail(fname) {
	var tmp = fsFindObj("fldFname").value = fname;
	win = window.open("","vcImage","width=820,height=620,left=0,top=0,scrollbars=no");
	
	var o = fsFindObj( 'imagepopupform' );
	o.action = "fileadmin/templates/SAMSUNG_CAMERAS/php/vcimagepopup.php";
	o.method = "post";
	o.target = "vcImage";
	o.submit();
}

function download( fdir, fname ) {
	var tmp = fsFindObj("fldFdir").value = fdir;
	var tmp = fsFindObj("fldFname").value = fname;
	fsSubmit("fileadmin/templates/SAMSUNG_CAMERAS/php/download.php");
}

function searchtext() {
	var tmp = fsFindObj("tx_indexedsearch[sword]").value;
	if (tmp != "Suche" && tmp.length > 0) {
		fsSubmitForm("searchform", "index.php?id=suche&L=0");
	}
}

function searchtextPresse() {
	var tmp = fsFindObj("tx_indexedsearch[sword]").value;
	if (tmp != "Suche" && tmp.length > 0) {
		fsSubmitForm("searchform", "index.php?id=suchepresse&L=0");
	}
}

function searchtextHaendler() {
	var tmp = fsFindObj("tx_indexedsearch[sword]").value;
	if (tmp != "Suche" && tmp.length > 0) {
		fsSubmitForm("searchform", "index.php?id=suchehaendler&L=0");
	}
}

function fsSubmitForm( form, url )
{
  var o = fsFindObj( form );
  o.action = url;
  o.method = "post";
  o.submit();
}


function fsSubmit( url )
{
  var o = fsFindObj( 'mainform' );
  o.action = url;
  o.method = "post";
  o.submit();
}

function fsOpenPopUp( url, width, height ) {
  page = open ("","PopUp","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=" + width + ",height=" + height);
  page.location = url;
  page.focus();
}

function fsOpenPopUpStatic( url, width, height ) {
  page = open ("","PopUp","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=" + width + ",height=" + height);
  page.location = url;
  page.focus();
}

function fsFindObj(n, d) { //v3.0
  // alert("fsFindObj");
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}




 