    /*************************************************************************
      This code is from Dynamic Web Coding at http://www.dyn-web.com/
      Copyright 2002-3 by Sharon Paine
      See Terms of Use at http://www.dyn-web.com/bus/terms.html
      regarding conditions under which you may use this code.
      This notice must be retained in the code as is!
    *************************************************************************/

    // See documentation for information about setting these properties
    // at www.dyn-web/com/dhtml/write-drag/documentation.html
	/*
	function right(mousebutton)
	{
		var msg1 = "Thank you for visit PhotoByDC.com / JavaHuan.com";
		
		if (navigator.appName == 'Netscape' && mousebutton.which==1)
		{
		alert(msg1);
		return false;
		}
	else
		if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
		{
		alert(msg1);
		return false;
		}
		return true;
	}
	document.onmousedown = right;
	*/
var isMSIE = /*@cc_on!@*/!1;
var oop = 40;
var op_id=0;
var phobj;
	
	var message="Thank you for visit PhotoByDC.com / JavaHuan.com";
	///////////////////////////////////
	function clickIE() {if (document.all) {(message);return false;}}
	function clickNS(e) {if 
	(document.layers||(document.getElementById&&!document.all)) {
	if (e.which==2||e.which==3) {(message);return false;}}}
	if (document.layers) 
	{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
	else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
	
	document.oncontextmenu=new Function("return false")
	
	function blu(a,b){
		a.filters.blur.strength=b
	}
    function blockswitch(switchobj){
        var sobj = document.getElementById('NTS'+switchobj);
        var aobj = document.getElementById('aopen'+switchobj);

        if(sobj.style.display=="none"){
            sobj.style.display="";
            aobj.src='./Pic/a2.gif';
        }else{
            sobj.style.display="none";
            aobj.src='./Pic/a1.gif';
        }

    }

    function switchpost(switchobj){
        var sobj = document.getElementById(switchobj);

        if(sobj.style.display=="none"){
            sobj.style.display="";
        }else{
            sobj.style.display="none";
        }

    }

	function switchreply(switchobj,action){
        var sobj = document.getElementById(switchobj);
        sobj.style.display=action;
     }
    function changepic(pic,imgobj) {
    	if (pic) {
    			imgobj.filters.blendTrans.Stop();
    			imgobj.filters.blendTrans.Apply();
    			imgobj.src=pic;
    			imgobj.filters.blendTrans.Play();
    	}
    }
    function _gallerypic(pic,imgobj,textvar,i) {
    	if (pic) {
    	 		
                preimages=new Image();
                preimages.src=pic[i];
                imgobj.style.borderColor = '#FFFFFF';
	            if(isMSIE){
	             	imgobj.filters[0].apply();
					//imgobj.style.filter="blendTrans(duration=2)";
					//imgobj.style.filter="blendTrans(duration=crossFadeDuration)";				
					//imgobj.filters.blendTrans.Apply();
				}
                SayText.innerText=textvar;
				imgobj.src=preimages.src;
	            if(isMSIE){
					//imgobj.filters.blendTrans.Play();
					imgobj.filters[0].play();					
				}else{
					oop = 40;
					phobj = imgobj;
					FadePhoto();
				}
                imgobj.style.borderColor = '#000000';			
    	}
    }
    $.fn.image = function(src, f){
   	return this.each(function(){
		var i = new Image();
		i.onload = f;
   		i.src = src;
   		this.appendChild(i);
	});
	}
    function gallerypic(pic,imgobj,textvar,i) {
    	if (pic) {
    		SayText.innerText='';
			$('#ShowPhoto').fadeOut('fast',function(){
				$('#ShowPhoto').html('');
				$('#ShowPhoto').image(pic[i],function(){
					$('#ShowPhoto').fadeIn('slow',function(){
						SayText.innerText=textvar;	
					});
					
				});	
			});
    	}
    }    
	function FadePhoto(){
		if(oop<=100){
			oop+=6;
			if(isMSIE){
				phobj.style.filter="alpha(opacity="+oop+")";					
			}else{
				phobj.style.MozOpacity=oop/100;
			}				
			op_id=setTimeout('FadePhoto()', 1);
		}
	}     
    function gallerypicBackup(pic,imgobj,textvar,i) {
    	if (pic) {
                preimages=new Image();
                preimages.src=pic[i];
                SayText.innerText=textvar;
                imgobj.style.borderColor = '#FFFFFF';
                //imgobj.border=0;
    			imgobj.filters.blendTrans.Stop();
    			imgobj.filters.blendTrans.Apply();
    			imgobj.src=preimages.src;
    			imgobj.filters.blendTrans.Play();
                imgobj.style.borderColor = '#000000';
    			//imgobj.border= 1
    	}
 
    }    
    function inputMouseOut(a,b){
        if(a.value == ''){
            a.value=b;
        }
    }
    function inputMouseIn(a,b){
        if(a.value == b){
            a.value='';
        }
    }

