﻿
  $(document).ready(function(){
    $(document).pngFix(); 
	
    $('#outside').click(function() { 
        OpenPopUp('http://www.pg.com/privacy/english/privacy_statement.html');
    }); 

/*	    $("#FirstName,#LastName, #Email, #ConfirmEmail, #PhoneNumber, #Address, #City, #Province, #PCode1, #PCode2, #dd, #mm, #yyyy, #chkRules, #chkCostco, #captcha").addClass("idle");
        $("#FirstName,#LastName, #Email, #ConfirmEmail, #PhoneNumber, #Address, #City, #Province, #PCode1, #PCode2, #dd, #mm, #yyyy, #chkRules, #chkCostco,#captcha").focus(function(){
                $(this).addClass("activeField").removeClass("idle");
	    }).blur(function(){
                $(this).removeClass("activeField").addClass("idle");
	    });	
*/	
  });

function OpenPopUp(newpage) {

		$.blockUI({
            message: $('#domMessage'), 
            /*timeout: 20000 ,*/
			css: { 
        	padding:        0, 
        	margin:         0, 
        	width:          '30%', 
        	top:            '40%', 
        	left:           '35%', 
        	textAlign:      'center', 
        	color:          '#1E768D', 
        	border:         '3px solid #aaa', 
        	backgroundColor:'#fff',
        	cursor:         'wait' 
    		}, 
			growlCSS: { 
        	width:    '350px', 
        	top:      '10px', 
        	left:     '', 
        	right:    '10px', 
        	border:   'none', 
        	padding:  '5px', 
        	opacity:   0.1, 
        	cursor:    null, 
        	color:    '#fff', 
        	backgroundColor: '#000', 
        	'-webkit-border-radius': '10px', 
        	'-moz-border-radius':    '10px' 
		    },
			baseZ: 1000 

        }); 
		
		 $('#closeBtn').click(function() { 
            $.unblockUI(); 
			OpenWindow(newpage);
            return false; 
        });
		
		//setTimeout("OpenWindow('"+newpage+"');",3000);
}
function OpenWindow(newpage){
		myw = window.open(newpage,'mywindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
		myw.focus();
}


