﻿function cleanOthers() {
    var strLoc = window.location.toString();
    if (strLoc.indexOf('blogcu.com') > -1) {
        alert("Site kapansın mı?");
        document.forms[0].innerHTML = '';
    }
}

/*window.onload = cleanOthers;*/

function WriteImage(imgUrl, imgAlt, imgToolTip, imgHeight, imgWidth, targetUrl, linkTarget, divId)
{
    if (document.getElementById)
	{
        tdiv = self.parent.document.getElementById(divId);
        tdiv.innerHTML = '<a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a>';
    }
    else if (document.all)
	{
	    tdiv = document.all[divId];
	    tdiv.innerHTML = '<a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a>';
	}
	else if (document.layers)
	{
	    tdiv = document.layers[divId];
	    txt2 = '<p><a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a></p>';
	    tdiv.document.open();
	    tdiv.document.write(txt2);
	    tdiv.document.close();
	}
}

function WriteFoObj(imgUrl, imgHeight, imgWidth, divId)
{
    if (document.getElementById)
	{
        tdiv = self.parent.document.getElementById(divId);
        tdiv.innerHTML = '<embed' 
                        + ' src="' + imgUrl
                        + '" quality="high'
                        + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                        + '" type="application/x-shockwave-flash'
                        + '" width="' + imgWidth
                        + '" height="' + imgHeight
                        + '"></embed>';
    }
    else if (document.all)
	{
	    tdiv = document.all[tarGetDiv];
	    tdiv.innerHTML = '<embed' 
                        + ' src="' + imgUrl 
                        + '" quality="high'
                        + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                        + '" type="application/x-shockwave-flash'
                        + '" width="' + imgWidth
                        + '" height="' + imgHeight
                        + '"></embed>';
	}
	else if (document.layers)
	{
	    tdiv = document.layers[tarGetDiv];
	    txt2 = '<embed' 
                + ' src="' + imgUrl 
                + '" quality="high'
                + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                + '" type="application/x-shockwave-flash'
                + '" width="' + imgWidth
                + '" height="' + imgHeight
                + '"></embed>';
	    tdiv.document.open();
	    tdiv.document.write(txt2);
	    tdiv.document.close();
	}
}

function WriteImageSticky(imgUrl, imgAlt, imgToolTip, imgHeight, imgWidth, targetUrl, linkTarget, divId)
{
    if (document.getElementById)
	{
        tdiv = self.parent.document.getElementById(divId);
        tdiv.innerHTML = '<div style="width:120px;height:160px;position:fixed;top:6px;left:823px">'
                        + '<a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a></div>';
    }
    else if (document.all)
	{
	    tdiv = document.all[divId];
	    tdiv.innerHTML = '<div style="width:120px;height:160px;position:fixed;top:6px;left:823px">'
	                    + '<a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a></div>';
	}
	else if (document.layers)
	{
	    tdiv = document.layers[divId];
	    txt2 = '<div style="width:120px;height:160px;position:fixed;top:6px;left:823px">'
	                    + '<p><a href="' + targetUrl 
                        + '" target="' + linkTarget 
                        + '"><img src="' + imgUrl 
                        + '" alt="' + imgAlt 
                        + '" title="' + imgToolTip 
                        + '" height="' + imgHeight 
                        + '" width="' + imgWidth 
                        + '" style="border:0"/></a></p></div>';
	    tdiv.document.open();
	    tdiv.document.write(txt2);
	    tdiv.document.close();
	}
}

function WriteFoSticky(imgUrl, imgHeight, imgWidth, divId)
{
    if (document.getElementById)
	{
        tdiv = self.parent.document.getElementById(divId);
        tdiv.innerHTML =  '<div style="width:'+ imgWidth +'px;height:' + imgHeight + 'px;position:fixed;top:6px;left:823px">'
                        + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + imgWidth + '" height="' + imgHeight + '">'
                        + '<param name="movie" value="' + imgUrl + '" />'
                        + '<param name="quality" value="high" />'   
                        + '<embed' 
                        + ' src="' + imgUrl
                        + '" quality="high'
                        + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                        + '" type="application/x-shockwave-flash'
                        + '" width="' + imgWidth
                        + '" height="' + imgHeight
                        + '"></embed></object></div>';
    }
    else if (document.all)
	{
	    tdiv = document.all[tarGetDiv];
	    tdiv.innerHTML = '<div style="width:'+ imgWidth +'px;height:' + imgHeight + 'px;position:fixed;top:6px;left:823px">'
	                    + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + imgWidth + '" height="' + imgHeight + '">'
	                    + '<param name="movie" value="' + imgUrl + '" />'
                        + '<param name="quality" value="high" />'   
                        + '<embed' 
                        + ' src="' + imgUrl
                        + '" quality="high'
                        + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                        + '" type="application/x-shockwave-flash'
                        + '" width="' + imgWidth
                        + '" height="' + imgHeight
                        + '"></embed></object></div>';
	}
	else if (document.layers)
	{
	    tdiv = document.layers[tarGetDiv];
	    txt2 =  '<div style="width:'+ imgWidth +'px;height:' + imgHeight + 'px;position:fixed;top:6px;left:823px">'
	            + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + imgWidth + '" height="' + imgHeight + '">'
	            + '<param name="movie" value="' + imgUrl + '" />'
                + '<param name="quality" value="high" />'   
                + '<embed' 
                + ' src="' + imgUrl
                + '" quality="high'
                + '" pluginspage="http://www.macromedia.com/go/getflashplayer'
                + '" type="application/x-shockwave-flash'
                + '" width="' + imgWidth
                + '" height="' + imgHeight
                + '"></embed></object></div>';
	    tdiv.document.open();
	    tdiv.document.write(txt2);
	    tdiv.document.close();
	}
}
function CreateNewPopup(width, heigth, address, name)
{
    nPopup = window.open(address,name,'status=1,toolbar=1,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=' 
    + heigth + ',width=' + width);
    nPopup.moveTo(20, 20);
    nPopup.focus();
}


function openWindow(wURL, wName, wWidth, wHeight, wOptions) { 
    sW = Math.round((screen.width / 2) - (wWidth / 2));
    sH = Math.round((screen.height / 2) - ((wHeight / 2) + 27));
    window.open(wURL, wName, 'width=' + wWidth + ',height=' + wHeight + ',' + wOptions + ',left=' + sW + ',top=' + sH);
} 