﻿

function Loading1() {
    //alert(document.getElementById('myframe').src)

    document.getElementById('myframe').src = document.getElementById(ctrlPrefix1 + 'hid_Url').value

}

function SiteSearch() {

    if (document.getElementById(ctrlPrefix1 + "txt_Search").value == "" || checkBlank(document.getElementById(ctrlPrefix1 + "txt_Search"))) {
        //alert('متن جستجو را وارد نمایید')
        return false;
    }

    var item = document.getElementById(ctrlPrefix1 + "txt_Search").value

    document.getElementById(ctrlPrefix1 + "txt_Search").value = ""
    document.getElementById(ctrlPrefix1 + "txt_Search").style.color = "Gray"

    var props = 'scrollBars=yes,resizable=no,toolbar=yes,menubar=yes,location=yes,directories=yes,width=650,height=550,status=yes,titlebar=yes';

    winPrint = window.open("winSiteSearch.aspx?Search=" + item, "Add_more", props);
    if (!winPrint.opener) winPrint.opener = self;

    if (window.focus) { winPrint.focus() }

    return false;

}


function WebSearch() {

    if (document.getElementById(ctrlPrefix1 + "txt_Search").value == "" || checkBlank(document.getElementById(ctrlPrefix1 + "txt_Search"))) {
        //alert('متن جستجو را وارد نمایید')
        return false;
    }

    var item = document.getElementById(ctrlPrefix1 + "txt_Search").value
    document.getElementById(ctrlPrefix1 + "txt_Search").value = ""
    document.getElementById(ctrlPrefix1 + "txt_Search").style.color = "Gray"

    var props = 'scrollBars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes,directories=yes,width=550,height=500,status=yes,titlebar=yes';

    winPrint = window.open("winSearch.aspx?Type=web&Item=" + item, "Add_more", props);
    if (!winPrint.opener) winPrint.opener = self;

    if (window.focus) { winPrint.focus() }



    return false;

}


function Status(item) {

    if (item == 'down') {
        document.getElementById(ctrlPrefix1 + "txt_Search").value = ""
        document.getElementById(ctrlPrefix1 + "txt_Search").style.color = "Black"

    }
    else if (item == 'leave') {
        if (checkBlank(document.getElementById(ctrlPrefix1 + "txt_Search"))) {
            document.getElementById(ctrlPrefix1 + "txt_Search").value = ""
            document.getElementById(ctrlPrefix1 + "txt_Search").style.color = "Gray"
        }
    }

}