// JScript File

function GalleryWindow()
{
    url = "Gallery.aspx?id=" +
        document.getElementById("ctl00_ContentPlaceHolder2_FolderLabel").innerHTML;
    window.open(url,'Gallery','width=690, height=500');
}

var newWindow;
var newContent;
function printWindow()
{
    if (!newWindow || newWindow.closed) {
        newWindow = window.open("","sub","status,height=550,width=585,scrollbars=yes");
        if (!newWindow.opener) {
            newWindow.opener = window;
        }
        setTimeout("writePrint()", 500);
    } else if (newWindow.focus) {
        newWindow.focus();
    }
}
function saveWindow() {
    if (!newWindow || newWindow.closed) {
        newWindow = window.open("","sub","status,height=550,width=585,scrollbars=yes");
        if (!newWindow.opener) {
            newWindow.opener = window;
        }
        setTimeout("writeSave()", 500);
    } else if (newWindow.focus) {
        newWindow.focus();
    }
    setTimeout("doSave()", 2000);
}
function doSave()
{
    nm = document.getElementById("ctl00_ContentPlaceHolder2_HeaderLabel").innerHTML;
    newWindow.document.execCommand('SaveAs','1','Abouna.org_' + nm + '.htm');
}
function emailWindow() {
    if (!newWindow || newWindow.closed) {
        newWindow = window.open("","sub","status,height=550,width=585,scrollbars=yes");
        if (!newWindow.opener) {
            newWindow.opener = window;
        }
        setTimeout("writeEmail()", 500);
    } else if (newWindow.focus) {
        newWindow.focus();
    }
}
function writePrint()
{
    newContent = "<html><head><title>Abouna.org</title><link href=\"styleSheet.css\" rel=\"stylesheet\" type=\"text/css\" />";
    newContent += "<script>function doAction() {document.body.offsetHeight;window.print();}</";
    newContent += "script></head>";
    newContent += "<body onload=\"doAction()\">"
    writebody();
    newContent += "</body></html>";
    newWindow.document.write(newContent);
    newWindow.document.close(); // close layout stream
}
function writeSave()
{
    newContent = "<html><head><title>Abouna.org</title><link href=\"http://abouna.org/styleSheet.css\" rel=\"stylesheet\" type=\"text/css\" />";
    //newContent += "<script>var isDo=true; function doAction() {if(isDo){document.execCommand(\"SaveAs\"); isDo=false;}}</";
    newContent += "</head>";//"script></head>";
    newContent += "<body>";// onload=\"doAction()\">"
    writebody();
    newContent += "</body></html>";
    newContent = newContent.replace(/src=\"\//gi,"src=\"");
    newWindow.document.write(newContent.replace(/src=\"/gi,"src=\"http://abouna.org/"));
    newWindow.document.close(); // close layout stream
}
function writeEmail()
{
    newContent = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
    newContent += "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>Abouna.org</title><link href=\"styleSheet.css\" rel=\"stylesheet\" type=\"text/css\" />";
    newContent += "</head>";
    newContent += "<body>"
    newContent +="<form name=\"form1\" method=\"post\" action=\"mailSend.aspx?id="+
        document.getElementById("ctl00_ContentPlaceHolder2_IDLabel").innerHTML+"&tp="+
        document.getElementById("ctl00_ContentPlaceHolder2_TypeLabel").innerHTML+"\" id=\"form1\">";
    newContent +="<div><input type=\"hidden\" name=\"__EVENTTARGET\" id=\"__EVENTTARGET\" value=\"\" />";
    newContent +="<input type=\"hidden\" name=\"__EVENTARGUMENT\" id=\"__EVENTARGUMENT\" value=\"\" /></div>";
    newContent +="<script type=\"text/javascript\"><!--var theForm = document.forms['form1'];";
    newContent +="if (!theForm) {    theForm = document.form1;}function __doPostBack(eventTarget, eventArgument) {  if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); }}// -->";
    newContent +="</script>";
    writeDIV();
    newContent +="<div id=\"DIV1\" style=\"width: 100%; height: 100%\">";
    writebody();
    newContent +="</div>";
    newContent += "</form></body></html>";
    newWindow.document.write(newContent);
    newWindow.document.close(); // close layout stream
}
function writebody() {
    newContent += "<div align=\"center\"><img src=\"images/logo101.jpg\" /></div>";
    newContent += "<div style=\"height: 15px\"></div>";
    newContent += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-right: #c0c0c0 1px solid;";
    newContent += "border-top: #c0c0c0 1px solid; border-left: #c0c0c0 1px solid; width: 100%; border-bottom: #c0c0c0 1px solid\">";
    newContent += "<tr><TD dir=\"rtl\" style=\"PADDING-RIGHT: 12px; PADDING-LEFT: 12px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; BACKGROUND-COLOR: #f5f5f5\" align=\"center\">";
    newContent += "<TABLE style=\"WIDTH: 100%\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\"><TBODY><TR><TD vAlign=\"baseline\" align=\"center\">";
    newContent += "<SPAN id=\"ctl00_ContentPlaceHolder2_HeaderLabel\" style=\"FONT-WEIGHT: bold; FONT-SIZE: 13pt; COLOR: #31759d; FONT-FAMILY: Simplified Arabic\">";
    
    newContent += document.getElementById("ctl00_ContentPlaceHolder2_HeaderLabel").innerHTML;
    
    newContent += "</SPAN></TD></TR></TBODY></TABLE><TABLE style=\"WIDTH: 100%\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\"><TBODY><TR><TD vAlign=\"top\" align=\"left\">";
    newContent += "<SPAN id=\"ctl00_ContentPlaceHolder2_WriterLabel2\" style=\"FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: #991220; FONT-FAMILY: Simplified Arabic\">";
    
    newContent += document.getElementById("ctl00_ContentPlaceHolder2_WriterLabel2").innerHTML;
    
    newContent += "</SPAN></TD></TR></TBODY></TABLE>";
    newContent += "</TD></tr></table>";
    newContent += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"HEIGHT: 4px\"></td></tr></table> ";
    newContent += document.getElementById("newsDIV").innerHTML;
}
        
function writeDIV()
{
    newContent += "<DIV class=\"modalBackground\" style=\"Z-INDEX: 10000; LEFT: 0px; WIDTH: 1259px; POSITION: fixed; TOP: 0px; HEIGHT: 2288px\"></DIV>";
    newContent += "<DIV style=\"Z-INDEX: 10001; LEFT: 100px; POSITION: fixed; TOP: 186px\">";
    newContent += "<DIV style=\"Z-INDEX: 1; LEFT: 5px; VISIBILITY: inherit; WIDTH: 241px; POSITION: absolute; TOP: 5px; HEIGHT: 111px; BACKGROUND-COLOR: black\"></DIV>";
    newContent += "<DIV class=\"modalPopup\" id=\"ctl00_ContentPlaceHolder1_Panel1\" style=\"Z-INDEX: 2; WIDTH: 229px; POSITION: relative\">";
    newContent += "<TABLE style=\"WIDTH: 100%\"><TBODY><TR><TD style=\"WIDTH: 37px; HEIGHT: 5px\"></TD><TD style=\"PADDING-RIGHT: 5px; WIDTH: 3px; HEIGHT: 5px; TEXT-ALIGN: right\"></TD><TD></TD></TR><TR><TD style=\"PADDING-LEFT: 5px; WIDTH: 37px; TEXT-ALIGN: left\"><STRONG><SPAN style=\"FONT-SIZE: 10pt; COLOR: #3f418e; FONT-FAMILY: Tahoma\">Email</SPAN></STRONG></TD><TD style=\"WIDTH: 3px\" align=\"right\"><STRONG><SPAN>:</SPAN></STRONG></TD><TD style=\"PADDING-RIGHT: 5px; PADDING-LEFT: 5px; TEXT-ALIGN: left\">";
    
    newContent += "<input name=\"EmailTB\" type=\"text\" id=\"EmailTB\" style=\"WIDTH: 149px\" />";
    newContent += "</TD></TR><TR><TD style=\"PADDING-LEFT: 5px; WIDTH: 37px; TEXT-ALIGN: left\"></TD><TD style=\"WIDTH: 3px\" align=\"right\"></TD><TD style=\"PADDING-RIGHT: 5px; PADDING-LEFT: 5px; TEXT-ALIGN: left\"></TD></TR><TR><TD style=\"PADDING-LEFT: 5px; WIDTH: 37px; TEXT-ALIGN: left\"><STRONG><SPAN style=\"FONT-SIZE: 10pt; COLOR: #3f418e; FONT-FAMILY: Tahoma\">Name</SPAN></STRONG></TD><TD style=\"WIDTH: 3px\" align=\"right\"><STRONG>:</STRONG></TD><TD style=\"PADDING-RIGHT: 5px; PADDING-LEFT: 5px; TEXT-ALIGN: left\">";
    newContent += "<input name=\"NameTB\" type=\"text\" id=\"NameTB\" style=\"WIDTH: 149px\" />";
    newContent += "</TD></TR><TR><TD style=\"WIDTH: 37px; HEIGHT: 5px\"></TD><TD style=\"WIDTH: 3px; HEIGHT: 5px\"></TD><TD></TD></TR></TBODY></TABLE>";
    newContent += "<input type=\"submit\" name=\"OKButton\" value=\"Send\" id=\"OKButton\" style=\"WIDTH: 60px\"/>";
    newContent += "</DIV> </DIV></TD></TR></TBODY></TABLE>";
    newContent += "<input name=\"newsHead\" type=\"text\" id=\"newsHead\" style=\"WIDTH: 149px; display:none; visibility:hidden\" value=\"" +
        document.getElementById("ctl00_ContentPlaceHolder2_HeaderLabel").innerHTML + "\" />";
    newContent += "</DIV>";
    
    newContent += "</DIV>";
}

        
 
