Try giving your function its own parameters and do a template_redirect, something like this:
<?php
function mypage_scripts() {
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', true, '1.6.2', false);
wp_enqueue_script('jquery');
/* My Script */
function contact_form_script() {
if ( !is_page('contact') ) {
wp_enqueue_script('myscript', get_bloginfo('template_url') . '/js/myscript.js', array('jquery'), '1.1', false);
}
}
add_action( 'template_redirect', 'contact_form_script' );
}
add_action( 'wp_print_scripts', 'mypage_scripts');
}
?>
I’ve not checked this, but I believe it will work.
I Checked this one on on one of my themes and it worked:.
<?php
function mypage_scripts() {
if ( !is_admin() ){
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', true, '1.6.2', false);
wp_enqueue_script('jquery');
}
add_action( 'wp_print_scripts', 'mypage_scripts');
}
function contact_form_script() {
if ( !is_page('contact') ) {
wp_enqueue_script('myscript', get_bloginfo('template_url') . '/js/myscript.js', array('jquery'), '1.1', false);
}
}
add_action( 'template_redirect', 'contact_form_script' );
?>
NOTE:
The one thing I did diferent on my test is I wasn’t using the Google scripts. Maybe that is giving you the issue?