function OpenPictureWindow(imageUrl,imageWidth,imageHeight,alt,posLeft,posTop) {
	var newWindow = window.open("","pictureWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
    newWindow.document.write('<img src=\"'+imageUrl+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
}

function OpenWindow(url,name,features) {
	newwindow=window.open(url,name,features);
	if (window.focus) {newwindow.focus()}
	return false;
}

function OpenStandardWindow(pageUrl, windowName, width, height, isScrollbarsVisible)
{
    var top = 0;
    var left = 0;
   
    if (screen.height > 0) top = (screen.height - height) / 2;
    if (screen.width > 0) left = (screen.width - width) / 2;    
    
    var scrollbars = (isScrollbarsVisible) ? "yes" : "no";
    var features = 'width=' + width + ',height=' + height + ',top=' + top +',left=' + left + ',scrollbars=' + scrollbars
    OpenWindow(pageUrl, windowName, features);
}

function ShowHideContainer(containerId)
{
    var container = GetElementById(containerId);
    if (container && container.css) container.css.display = (container.css.display == "none") ? "block" : "none";
}

function GetElementById(elementId) {
	var element = (document.getElementById) ? document.getElementById(elementId) : (document.all) ? document.all[elementId] : (document.layers) ? document.layers[elementId] : null;
	if (element) element.css = (element.style) ? element.style : element;
	return element;
}

function OpenVideoPlayerWindow(videoUrl)
{
    OpenStandardWindow("/Content/Popups/VideoPlayerPopup.aspx?VideoUrl=" + videoUrl, 'VideoPlayer', 380, 430, false);
}

function OpenSbs6ChoiceAssistanceWindow()
{
    OpenStandardWindow("http://www.fddobs.com/hesaplama/sbs6.asp", "OksChoiceAssistanceWindow", 500, 500, true);
}

function OpenOssChoiceAssistanceWindow()
{
    OpenStandardWindow("http://www.fddobs.com/hesaplama/oss.asp", "OssChoiceAssistanceWindow", 700, 700, true);
}

function OpenSbs7ChoiceAssistanceWindow()
{
    OpenStandardWindow("http://www.fddobs.com/hesaplama/sbs7.asp", "OssChoiceAssistanceWindow", 500, 500, true);
}

function OpenSbs8ChoiceAssistanceWindow()
{
    OpenStandardWindow("http://www.fddobs.com/hesaplama/sbs8.asp", "OssChoiceAssistanceWindow", 500, 500, true);
}

function OpenOBS()
{
    OpenStandardWindow("/Obs/online.asp", "OBSWindow", 600, 400, true);
}
function OpenOBS2()
{
    OpenStandardWindow("http://fddobs.com/f_o_d_b_d_s/f-d-d-07-o-b-s.asp", "OBSWindow", 900, 570, true);
}
