function description_picture(id, width, height, alt, section)
{
    if(id == "" || id == null) {
		return;
	}

	if (width == "" || width == null || height == "" || height == null) {
		width = 800;
		height = 600;
	}

	wx = (screen.width-width)/2;
    wy = (screen.height-height)/2;

    wx = 0;
    wy = 0;

    wnd=window.open("/images/popup_description_picture.php?id="+id+"&width="+width+"&height="+height+"&alt="+alt+"&section="+section, "_blank", "width="+(width+50)+",height="+(height+120)+",status=no,resizable=0,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}
 
function guide_gallery_picture(id, width, height)
{
    if(id == "" || id == null) {
		return;
	}
	
	if (width == "" || width == null || height == "" || height == null) {
		width = 800;
		height = 600;
	}
	
	wx = (screen.width-width)/2;
    wy = (screen.height-height)/2;

    wx = 0;
    wy = 0;
	
    wnd=window.open("/guide/popup_gallery_picture.php?id="+id+"&width="+width+"&height="+height, "_blank", "width="+(width+60)+",height="+(height+135)+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}
 
function picture(id, width, height)
{
    if(id == "" || id == null) {
		return;
	}
	
	if (width == "" || width == null || height == "" || height == null) {
		width = 800;
		height = 600;
	}
	
	wx = (screen.width-width)/2;
    wy = (screen.height-height)/2;

    wx = 0;
    wy = 0;

    wnd=window.open("/images/popup_picture.php?id="+id+"&width="+width+"&height="+height, "_blank", "width="+(width+50)+",height="+(height+70)+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}
 
function school_lesson_picture(id, width, height)
{
    if(id == "" || id == null) {
		return;
	}
	
	if (width == "" || width == null || height == "" || height == null) {
		width = 800;
		height = 600;
	}
	
	wx = (screen.width-width)/2;
    wy = (screen.height-height)/2;

    //wx = 0;
    //wy = 0;

//    wnd=window.open("/school/lesson_popup_picture.php?id="+id+"&width="+width+"&height="+height, "_blank", "width="+(width+50)+",height="+(height+70)+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
    wnd=window.open(". "+id, "pic","width="+(width+50)+",height="+(height+70)+",status=no,resizable=1,scrollbars=0,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
    wnd.document.write("<center><img src=\"http://club.foto.ru/school/images/lessons/or/"+id+".jpg\" height='"+height+"' width='"+width+"' >");
    wnd.document.write("<br>");
    wnd.document.close();
    wnd.resizeTo(width+50, height+50);
    wnd.focus();

}

function std_popup_picture(url,width,height)
{
    if(url == "" || url == null) {
		return;
	}

	wx = (screen.width-300)/2;
    wy = (screen.height-300)/2;
    wnd=window.open("/images/popup_picture.php?url="+url, "_blank", "width="+(width+50)+",height="+(height+70)+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}

function school_report_picture(url,width,height,workname,username)
{
    if(url == "" || url == null) {
		return;
	}

	wx = (screen.width-300)/2;
    wy = (screen.height-300)/2;
    wnd=window.open("/school/report_popup_picture.php?url="+url+"&username="+username+"&workname="+workname, "_blank", "width="+(width+50)+",height="+(height+70)+",status=no,resizable=1,scrollbars=1,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}


function std_popup_window(url, width, height) {

    if(url == "" || url == null) {

		return;
	}
	
	if (width == "" || width == null || height == "" || height == null) {

		width = 800;
		height = 600;
	}
	
	wx = (screen.width / 2) - (width / 2);
    wy = (screen.height / 2) - (height / 2);

    wnd=window.open(url, "_blank", "width="+(width+20)+",height="+(height+30)+",status=no,resizable=no,scrollbars=no,toolbar=no,menubar=no, screenX="+wx+",screenY="+wy);
}
