﻿// JScript File
    function bookmark(url,title){

        if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
            window.external.AddFavorite(window.location.href,window.document.title );
        } else if (navigator.appName == "Netscape") {
            window.sidebar.addPanel(window.document.title, window.location.href,""); 
        } else {
            alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
        }
    }
    
    function saveImageAs (imgOrURL) {
	if (typeof imgOrURL == 'object')
		imgOrURL = imgOrURL.value;
	
	newWindow = window.open(imgOrURL, "SaveImage", "directories=no,status=no,menubar=no,toolbar=no,res izable=no,top=100000,left=100000,width=0,height=0");
	newWindow.document.execCommand('SaveAs', true);
	newWindow.close();
	return false;
	}

function popUpWindowCenter(URLStr, width, height)
	{
		LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
		
		popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'');

}

function SendtoFriend( s_title, s_url)
	{
	    width = 380;
	    height = 245;
		LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
		
		window.paramSendfriend1 = s_title;
	    window.paramSendfriend2 = s_url;
		popUpWin = open('popup/sendtofriend.aspx', 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'');

}

function DeleteComment(id,com_id,c,url)
	{
	    width = 380;
	    height = 245;
		LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
		para = 'id='+id+'&comid='+com_id+'&c='+c+'&url='+url;
		popUpWin = open('popup/deletecomment.aspx?'+para, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'');

}

function BlogSendtoFriend( s_title, s_url, s_thumb, stopic, sdesc)
	{
	    width = 380;
	    height = 305;
		LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
		
		window.paramSendfriend1 = s_title;
	    window.paramSendfriend2 = s_url;
	    window.paramSendfriend3 = s_thumb;
	    window.paramSendfriend4 = stopic;
	    window.paramSendfriend5 = sdesc;
	    
		popUpWin = open('popup/blogsendtofriend.aspx', 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'');

}

function BlogDeleteComment(id,blogtitle,c,url,bidx,pbidx)
	{
	    width = 380;
	    height = 270;
		LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
		para = 'id='+id+'&blogtitle='+blogtitle+'&c='+c+'&url='+url+'&bidx='+bidx+'&pbidx='+pbidx;
		popUpWin = open('popup/blogdeletecomment.aspx?'+para, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+LeftPosition+', top='+TopPosition+',screenX='+LeftPosition+',screenY='+TopPosition+'');

}

function clear_comment()
{
    document.getElementById('ctl00_CP_cname').value = "";
    document.getElementById('ctl00_CP_cemail').value = "";
    document.getElementById('ctl00_CP_comment').value = "";
}

function newpopup_sendx()
{  	
    width = 950;
	height = 500;
	LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
	
	var link = window.location.href ;
	//*art190110 var tit = window.document.getElementById("ctl00_contentPlace_lb_title").innerHTML;	
    //var tit = window.document.getElementById("lb_titlex").innerHTML;
    var tit = window.document.getElementById("ctl00_mainPageContent_lb_titlex").innerHTML;

//    'var tit = window.document.aspnetForm.ctl00_CP_lb_title.innerHTML;
	tit = tit.replace(/-/g, "@c@");
	link = link.replace(/-/g, "@c@")+ tit;	
//	alert('xxx');
	//var strReturn; strReturn=window.showModalDialog('popup/sendmail.aspx?link='+link,null,'status:no;dialogWidth:440px;dialogHeight:424px;dialogHide:true;help:no;scroll:no');
	//window.open('popup/newsendtofriend.aspx?link='+link,'Send_To_Friend','status=yes,width=390,height=390,left=' + LeftPosition + ',top=' + TopPosition);
    window.open('condition.html','conditon','status=yes,width=950,height=500,left=' + LeftPosition + ',top=' + TopPosition);
}
