function findObj(n, d) {
	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=findObj(n,d.layers[i].document);
	return x;
};

function changeProp(objName,x,theProp,theValue) {
	var obj = findObj(objName);
	if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
};

function showImg(nameImg) {
      winOpts = "toolbar=0,location=0,scrollbars=1,width=600,height=400";
      win1    = window.open("", "picWin", winOpts);
      win1.document.open();
      win1.document.write(
        "<html>" +
        "<head><title> </title>" +
        "<body><center><img src='piclarge/" +
	nameImg +
	".jpg'>" +
        "<hr>" +
        "<form><input type=button value='' " +
        "onClick='self.close()'></form></center>" +
        "</body></html>");
      win1.document.close();
};

function showSert(nameImg) {
      winOpts1 = "toolbar=0,location=0,scrollbars=1,width=630,height=480";
      win2    = window.open("", "picWin", winOpts1);
      win2.document.open();
      win2.document.write(
        "<html>" +
        "<head><title>  </title>" +
        "<body><center><img src='/company/certificate/" +
	nameImg +
	".jpg'>" +
        "<hr>" +
        "<form><input type=button value='' " +
        "onClick='self.close()'></form></center>" +
        "</body></html>");
      win2.document.close();
};

