Документ взят из кэша поисковой машины. Адрес оригинального документа : http://star.arm.ac.uk/archives/Clocks/BettsImages/_source/PHP_%20imagecopyresized%20-%20Manual.mht
Дата изменения: Wed Jun 27 17:40:05 2012
Дата индексирования: Sun Apr 10 11:56:09 2016
Кодировка:

Поисковые слова: запрещенные спектральные линии
Content-Type: multipart/related; start=; boundary=----------6nhAxGuvOMzG6waYgcmWNI
Content-Location: http://php.net/manual/en/function.imagecopyresized.php
Subject: =?utf-8?Q?PHP:=20imagecopyresized=20-=20Manual?=
MIME-Version: 1.0

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline; filename=function.imagecopyresized.htm
Content-Type: text/html; charset=utf-8; name=function.imagecopyresized.htm
Content-ID:
Content-Location: http://php.net/manual/en/function.imagecopyresized.php
Content-Transfer-Encoding: Quoted-Printable

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd=
">
>

PHP: imagecopyresized - Manual




"/>
avicon.ico" />





" />
k" href=3D"http://php.net/imagecopyresized" />
0/" about=3D"#content" />
copyresized.php" />

p" />














search for

y=3D"s" />
in the

src=3D"http://static.php.net/www.php.net/images/small_submit_w=
hite.gif"
class=3D"submit" alt=3D"search" />















imagecreate tic.php.net/www.php.net/images/caret-r.gif" alt=3D">" width=3D"11" he=
ight=3D"7" />



php.net/www.php.net/images/caret-l.gif" alt=3D"<" width=3D"11" height=
=3D"7" />imagecopyresampled




[ PHP&perm=3Den/function.imagecopyresized.php">edit] Last updated:=
Fri, 22 Jun 2012



view this page in


/small_submit.gif" id=3D"changeLangImage" alt=3D"Change language" />







imagecopyresized


(PHP 4, PHP 5)

lass=3D"refname">imagecopyresized ">Copy and resize part of an image




sized-description">

Description



bool i=
magecopyresized

( resource <=
code class=3D"parameter">$dst_image

, resource ode class=3D"parameter">$src_image
, int lass=3D"parameter">$dst_x
, int lass=3D"parameter">$dst_y
, int lass=3D"parameter">$src_x
, int lass=3D"parameter">$src_y
, int lass=3D"parameter">$dst_w
, int lass=3D"parameter">$dst_h
, int lass=3D"parameter">$src_w
, int lass=3D"parameter">$src_h
)



imagecopyresized() =
copies a rectangular
portion of one image to another image.
dst_image is the destinatio=
n image,
src_image is the source ima=
ge identifier.



In other words, imagecopyresized()<=
/strong>
will take an =

rectangular area from src_image<=
/em> of width =

src_w and height class=3D"parameter">src_h at =

position (src_x, lass=3D"parameter">src_y) =

and place it in a rectangular area of d=
st_image
=

of width dst_w and height <=
em>dst_h

at position (dst_x, e class=3D"parameter">dst_y).



If the source and destination coordinates and width and heights
differ, appropriate stretching or shrinking of the image fragment
will be performed. The coordinates refer to the upper left
corner. This function can be used to copy regions within the
same image (if dst_image is=
the same as
src_image) but if the regio=
ns overlap the
results will be unpredictable.




ized-parameters">

Parameters







dst_image=



Destination image link resource.








src_image=



Source image link resource.








dst_x >



x-coordinate of destination point.








dst_y >



y-coordinate of destination point.








src_x >



x-coordinate of source point.








src_y >



y-coordinate of source point.








dst_w >



Destination width.








dst_h >



Destination height.








src_w >


Source width.








src_h >


Source height.











esized-returnvalues">

Return Values



Returns TRUE on success or e>FALSE on failure.




ed-examples">

Examples




Example #1 Resizing an image



This example will display the image at half size.




<?php
: #FF8000">// File and new size
yle=3D"color: #0000BB">$filename  00">=3D 'test.jpg' n style=3D"color: #007700">;
=
$percent 
=3D  n style=3D"color: #0000BB">0.5; />
// Content type=

header color: #007700">('Content-Type:&nb=
sp;image/jpeg'
);

>// Get new sizes
pan>list( 00BB">$width yle=3D"color: #0000BB">$height)&nb=
sp;=3D 
getimagesize an style=3D"color: #007700">(
$file=
name
);
color: #0000BB">$newwidth =3D=
 
$width  le=3D"color: #007700">* $perc=
ent
;
lor: #0000BB">$newheight =3D&=
nbsp;
$height  le=3D"color: #007700">* $perc=
ent
;

=3D"color: #FF8000">// Load
BB">$thumb =3D  pan style=3D"color: #0000BB">imagecreatetruecolor
olor: #007700">($newwidth pan style=3D"color: #007700">,  ">$newheight);
tyle=3D"color: #0000BB">$source  0">=3D imagecreatefromjpeg
pan>( ">$filename);

pan style=3D"color: #FF8000">// Resize
olor: #0000BB">imagecopyresized( span>$thumb 007700">, $source style=3D"color: #007700">, 0=
: #0000BB">0 yle=3D"color: #0000BB">0
pan>0 ">, $newwidth le=3D"color: #007700">, $newh=
eight
color: #0000BB">$width
n>$height 7700">);

// Output=

imagejpeg "color: #007700">($thumb an style=3D"color: #007700">);
">?>




The above example will output
something similar to:



=


ed.jpg" alt=3D"Output of example : Resizing an image" width=3D"47" heigh=
t=3D"25" />



The image will be output at half size, though better
quality could be obtained using "function.imagecopyresampled.php" class=3D"function">imagecopyresampled(=
)
.






notes">

Notes


Note: =


There is a problem due to palette image limitations (255+1 colors).
Resampling or filtering an image commonly needs more colors than 255=
, a
kind of approximation is used to calculate the new resampled pixel a=
nd its
color. With a palette image we try to allocate a new color, if that=

failed, we choose the closest (in theory) computed color. This is
not always the closest visual color. That may produce a weird result=
, like
blank (or visually blank) images. To skip this problem, please use =
a
truecolor image as a destination image, such as one created by
hp" class=3D"function">imagecreatetruecolor().





d-seealso">

See Also



class=3D"function" rel=3D"rdfs-seeAlso">imagecopyresampled() - Copy=
and resize part of an image with resampling















licson0729 at gmail dot com
17-Nov-2011 03:09


I couldn't find any script that resize an image and give border to it. S=
o I made one myself. Hope that can help you.



<?php

function i=
magecopyresizedwithborder
(& an class=3D"default">$src
, ass=3D"default">$width, =3D"default">$height, "default">$borderthickess, ass=3D"default">$bordercolor=3D an class=3D"default">NULL)

{

    list(
$width_orig >, $height_orig span>) =3D array(=
imagesx
($s=
rc
),images=
y
($src
an>));



    if (
$width n class=3D"keyword">&& ($width_or=
ig
< $h=
eight_orig
))

    {

       
$width <=
/span>=3D ($heigh=
t
/ $heigh=
t_orig
) * =
$width_orig
;

    }

    else

    {

       
$height =
=3D ($widt=
h
/ $width=
_orig
) * $=
height_orig
;

    }

   

   
$dst s=3D"keyword">=3D imagecreatetruecolor pan>($width >+2 lass=3D"keyword">*$borderthickess<=
span class=3D"keyword">,
$height an class=3D"keyword">+
2 =3D"keyword">*$borderthickess class=3D"keyword">);

   
imagecolortransparent<=
/span>($dst >,imagecoloralloc=
ate
($dst span>,0 an class=3D"keyword">,0 =3D"keyword">,0 ord">));

   
imagealphablending an>($dst pan class=3D"keyword">,false class=3D"keyword">);

   
imagesavealpha<=
span class=3D"keyword">(
$dst class=3D"keyword">,true =3D"keyword">);

   
imagefill class=3D"keyword">($dst =3D"keyword">,0 ord">,0,(i=
sset(
$bordercolor yword">) ? $bordercolor s=3D"keyword">: imagecolorallocate=
($dst class=3D"keyword">,
255 =3D"keyword">,255 yword">,255 >)));

   
imagecopyresampled an>($dst pan class=3D"keyword">,$src lass=3D"keyword">,$borderthickess<=
span class=3D"keyword">,$borderthickess span>,0 an class=3D"keyword">,0 =3D"keyword">,$width "keyword">,$height eyword">,imagesx word">($src >),imagesy=
(
$src)); r />
    return
$dst n class=3D"keyword">;

}



?>






email at vladislav dot net
22-Jun-2011 03:30


I didn't find here before any script giving both GIF and PNG transparent=
images correct, so I offer you mine.


Here is the code for 'image.php' script to generate a resized or origina=
l sized images of any type (JPEG, GIF, PNG) with respect to possible tra=
nsparency of GIF and PNG.


The following script can be used in HTML tag IMG (to display an image ma=
rked in database with ID equal to 1 and resized to max 100px) like this:=



<img src=3D"image.php?id=3D1&size=3D100" />.





<?php


/* *************************


 * Script by A. Vladislav I.


 * ************************* */


$id =3D span>$_GET[ >'id'];


$size =3D =
$_GET[ an>'size'];


if(!empty(
$id d">))


{


/* Here you may take the source image pat=
h from where you want: current direcory, databse etc.


 I used the $_GET['id'] for giving the script an ID of the image in=
database, where its real name is stored.


 I consider later the $f variable responsible to store file name an=
d $type variable responsible to store mime type of the image. You may us=
e function GetImageSize() to discover the mime type.


 So don't forget to set the */


 
$f =
=3D
/*...*/ ">;


/* and */


 
$type d">=3D /*...*/ ord">;


/* ... */


}


$imgFunc =3D=
'';


switch(
$type ">)


{


    case
'image/gif'=
:


       
$img pan>=3D ImageCrea=
teFromGIF
(=
$f
);


       
$imgFunc=
=3D 'Image=
GIF'
;


       
$transpa=
rent_index
=3D ult">ImageColorTransparent( lass=3D"default">$img);


        if(
$tran=
sparent_index
!=3D(- default">1)) t">$transparent_color =3D ass=3D"default">ImageColorsForIndex( n>$img, an class=3D"default">$transparent_index);=



        break;


    case
'image/jpeg' >:


       
$img pan>=3D ImageCrea=
teFromJPEG
( >$f);


       
$imgFunc=
=3D 'Image=
JPEG'
;


        break;


    case
'image/png'=
:


       
$img pan>=3D ImageCrea=
teFromPNG
(=
$f
);


       
ImageAlp=
haBlending
( >$img,true=
);


       
ImageSav=
eAlpha
($im=
g
,true an>);


       
$imgFunc=
=3D 'Image=
PNG'
;


        break;


    default:


        die(
"ERRO=
R - no image found"
);


        break;


}


header( pan>"Content-Type: " ">.$type);=



if(!empty(
$size ord">))


{


    =



    list(
$w ass=3D"keyword">,$h keyword">) =3D GetImageSize lass=3D"keyword">($f "keyword">);


    if(
$w ss=3D"keyword">=3D=3D0 =3D"keyword">or $h eyword">=3D=3D0 word">) die("ERROR - zero image size" n>);


   
$percent class=3D"keyword">=3D $size class=3D"keyword">/ (($w s=3D"keyword">>$h "keyword">)?$w rd">:$h);


    if(
$percent n class=3D"keyword">>
0 ass=3D"keyword">and $percent class=3D"keyword"><1 =3D"keyword">)


    {


       
$nw an>=3D intval an>($w n class=3D"keyword">*$percent class=3D"keyword">);


       
$nh an>=3D intval an>($h n class=3D"keyword">*$percent class=3D"keyword">);


       
$img_res=
ized
=3D I=
mageCreateTrueColor
( "default">$nw, lt">$nh);


        if(
$type=
=3D=3D'imag=
e/png'
)


        {


           
ault">ImageAlphaBlending( ss=3D"default">$img_resized, class=3D"default">false);


           
ault">ImageSaveAlpha( "default">$img_resized, =3D"default">true);


        }


        if(!empty(
">$transparent_color))


        {


           
ault">$transparent_new =3D lass=3D"default">ImageColorAllocate( n>$img_resized, span>$transparent_color word">['red' >],$transparent_color "keyword">['green' yword">],$transparent_color lass=3D"keyword">['blue' =3D"keyword">]);


           
ault">$transparent_new_index =3D <=
span class=3D"default">ImageColorTransparent
d">($img_resized word">,$transparent_new =3D"keyword">);


           
ault">ImageFill( ault">$img_resized, "default">0, ">0, $tran=
sparent_new_index
);


        }


        if(
Image=
CopyResized
( ">$img_resized, ult">$img, >0,0 >,0 lass=3D"keyword">,0 keyword">, $nw rd">,$nh, =
$w,=
$h ))


        {


           
ault">ImageDestroy( default">$img);


           
ault">$img =3D ult">$img_resized;


            =



        }


    }


}


$imgFunc(<=
/span>$img);


ImageDestroy ">($img);


?>





P.S.


The script can be written better (optimized etc.), but I hope you can do=
it by yourself.






kvslaap
02-May-2009 07:17


this is a script which loops trough a directory that is currently set to=
"files" and resizes all images with respecting the image ratio





<?php


//use this line if you get the error mess=
age of using too much memory (strip '//')


//ini_set ( "memory_limit", "48M");





$target_width rd">=3D 800 >;


$target_height ord">=3D 600 ">;





if (
ob_get_level word">() =3D=3D 0 yword">) ob_start yword">();


if (
$handle ">=3D opendir d">('files/' >)) {


  while (
false "keyword">!=3D=3D ($file ss=3D"keyword">=3D readdir ass=3D"keyword">($handle s=3D"keyword">))) {


    if (
$file class=3D"keyword">!=3D
"." lass=3D"keyword">&& $file =
!=3D ".." pan class=3D"keyword">) {


      $destination_pa=
th
=3D './f=
iles/'
;


     
$target_path span>=3D $destina=
tion_path
. ">basename( >$file);





     
$extension an>=3D pathinfo span>($target_pat=
h
);


     
$allowed_ext span>=3D "jpg, gif=
, png, bmp, jpeg, JPG"
;


     
$extension an>=3D $extension=
[extension=
];


     
$allowed_paths =
=3D explod=
e
(", " n>, $allowed_ext<=
/span>);


     
$ok n class=3D"keyword">=3D
0 ss=3D"keyword">;


      for(
$i <=
span class=3D"keyword">=3D
0 class=3D"keyword">; $i =3D"keyword">< count =3D"keyword">($allowed_paths class=3D"keyword">); $i =3D"keyword">++) {


        if (
$all=
owed_paths
[ >$i] =3D=3D >"$extension") {


         
$=
ok
=3D "1"<=
/span>;


        }


      }





      if (
$ok =
=3D=3D "1"<=
span class=3D"keyword">) {





        if(
$exte=
nsion
=3D=3D ">"jpg" || >$extension =3D=3D string">"jpeg" || efault">$extension =3D=3D ass=3D"string">"JPG"){


         
$=
tmp_image
=3D ">imagecreatefromjpeg( "default">$target_path);


        }





        if(
$exte=
nsion
=3D=3D ">"png") {


         
$=
tmp_image
=3D ">imagecreatefrompng( "default">$target_path);


        }





        if(
$exte=
nsion
=3D=3D ">"gif") {


         
$=
tmp_image
=3D ">imagecreatefromgif( "default">$target_path);


        }





       
$width <=
/span>=3D imagesx=
($tmp_imag=
e
);


       
$height =
=3D images=
y
($tmp_ima=
ge
);





       
//calcul=
ate the image ratio


       
$imgrati=
o
=3D ($wi=
dth
/ $hei=
ght
);





        if (
$img=
ratio
>1=
) {


         
$=
new_width
=3D lt">$target_width;


         
$=
new_height
=3D ( ault">$target_width / "default">$imgratio);


        } else {


         
$=
new_height
=3D ult">$target_height;


         
$=
new_width
=3D ( ult">$target_height * "default">$imgratio);


        }





       
$new_ima=
ge
=3D ima=
gecreatetruecolor
( efault">$new_width, default">$new_height);


       
ImageCop=
yResized
($=
new_image
, >$tmp_image, ">0,0 n>,0 class=3D"keyword">,0 "keyword">, $new_width "keyword">, $new_height =3D"keyword">, $width "keyword">, $height keyword">);


       
//Grab n=
ew image


       
imagejpe=
g
($new_ima=
ge
, $targe=
t_path
);


       
$image_b=
uffer
=3D =
ob_get_contents
();


       
ImageDes=
troy
($new_=
image
);


       
ImageDes=
troy
($tmp_=
image
);


        echo
" $f=
ile resized to $new_width x $new_height <br> \n"
=3D"keyword">;


        echo
str=
_pad
('' an>,4096 pan class=3D"keyword">)."\n" lass=3D"keyword">;  =



       
ob_flush=
();


       
flush
pan>();


      }


    }


  }


 
closedir ord">($handle d">);


  echo
"Done." eyword">;


 
ob_end_flush keyword">();


}


?>






david from quidware
28-Jan-2009 12:50


If the script should resize and save thumb I use this simple code, I mad=
e a couple corrections from last one and added the possibility to resize=
to a max HEIGHT:



<?php

/**

 * Make thumbs from JPEG, PNG, GIF source file

 *

 * $tmpname =3D $_FILES['source']['tmp_name'];  

 * $size - max width size

 * $save_dir - destination folder

 * $save_name - tnumb new name

 * $maxisheight - is max for width (if not is for height)

 *

 * Author:  David Taubmann rel=3D"nofollow" target=3D"_blank">http://www.quidware.com (edited =
from LEDok - get=3D"_blank">http://www.citadelavto.ru/)

 */

 

/*/    // And now how using this function fast:

if ($_POST[pic])

    {

    $tmpname  =3D $_FILES['pic']['tmp_name'];

    @img_resize( $tmpname , 600 , "../album" , "album_".$=
id.".jpg");

    @img_resize( $tmpname , 120 , "../album" , "album_".$=
id."_small.jpg");

    @img_resize( $tmpname , 60 , "../album" , "album_".$i=
d."_maxheight.jpg", 1);

    }

    else

    echo "No Images uploaded via POST";

/**/



function i=
mg_resize
( >$tmpname, >$size, $s=
ave_dir
, $=
save_name
, >$maxisheight =3D efault">0 )

    {

   
$save_dir   =
 
.=3D ( lt">substr( >$save_dir,- ">1) !=3D "=
/"
) ? "/" <=
/span>: ""<=
span class=3D"keyword">;

   
$gis    &nbs=
p;  
=3D lt">getimagesize( fault">$tmpname);

   
$type    &nb=
sp;  
=3D ult">$gis[=
2
];

    switch(
$type an class=3D"keyword">)

        {

        case
"1"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefromgif
( ">$tmpname); break;

        case
"2"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefromjpeg
( t">$tmpname);break;

        case
"3"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefrompng
( ">$tmpname); break;

        default: 
fault">$imorig =3D default">imagecreatefromjpeg( class=3D"default">$tmpname
);

        }



       
$x n>=3D imagesx an>($imorig >);

       
$y n>=3D imagesy an>($imorig >);

       

       
$woh pan>=3D (!$maxish=
eight
)? $g=
is
[0 >] : $gis<=
span class=3D"keyword">[
1 ss=3D"keyword">] ;   

       

        if(
$woh =
<=3D $s=
ize
)

        {

       
$aw an>=3D $x<=
span class=3D"keyword">;

       
$ah an>=3D $y<=
span class=3D"keyword">;

        }

            else

        {

            if(!
"default">$maxisheight){

               
n class=3D"default">$aw
=3D class=3D"default">$size;

               
n class=3D"default">$ah
=3D class=3D"default">$size * ass=3D"default">$y / "default">$x;

            } else {

               
n class=3D"default">$aw
=3D class=3D"default">$size * ass=3D"default">$x / "default">$y;

               
n class=3D"default">$ah
=3D class=3D"default">$size;

            }

        }  

       
$im an>=3D imagecreat=
etruecolor
( >$aw,$ah span>);

    if (
imagecopyresampled=
($im >,$imorig =
, 0 lass=3D"keyword">,0 keyword">,0 >,0, >$aw, class=3D"default">$ah, =3D"default">$x, ault">$y))

        if (
imag=
ejpeg
($im<=
/span>, $save_dir=
.$save_nam=
e
))

            return
=3D"default">true;

            else

            return
=3D"default">false;

    }

?>






it at chmzap dot ru
17-Aug-2008 10:52


If the script should resize and save thumb I use this simple code:





<?php


/**


 * Make thumbs from JPEG, PNG, GIF source file


 *


 * $tmpname =3D $_FILES['source']['tmp_name'];    =



 * $size - max width size


 * $save_dir - destination folder


 * $save_name - tnumb new name


 * =



 * Author:  LEDok - =3D"nofollow" target=3D"_blank">http://www.citadelavto.ru/


 */





function i=
mg_resize
( >$tmpname, >$size, $s=
ave_dir
, $=
save_name
)


    {


   
$save_dir class=3D"keyword">.=3D (
substr pan class=3D"keyword">($save_dir pan class=3D"keyword">,-1 ss=3D"keyword">) !=3D "/" s=3D"keyword">) ? "/" "keyword">: "" d">;


       
$gis&nbs=
p;     
=3D lass=3D"default">GetImageSize( n class=3D"default">$tmpname);


   
$type    &nb=
sp; 
=3D lt">$gis[2=
];


    switch(
$type an class=3D"keyword">)


        {


        case "1"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefromgif
( ">$tmpname); break;


        case
"2"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefromjpeg
( t">$tmpname);break;


        case
"3"<=
/span>: $imorig <=
/span>=3D imagecr=
eatefrompng
( ">$tmpname); break;


        default: 
fault">$imorig =3D default">imagecreatefromjpeg( class=3D"default">$tmpname
);


        } =






       
$x
n>=3D imageSX an>($imorig >);


       
$y n>=3D imageSY an>($imorig >);


        if(
$gis<=
/span>[0 pan class=3D"keyword">] <=3D
$size an>)


        {


       
$av an>=3D $x<=
span class=3D"keyword">;


       
$ah an>=3D $y<=
span class=3D"keyword">;


        }


            else


        {


           
ault">$yc =3D lt">$y*1.3=
333333
;


           
ault">$d =3D t">$x>$=
yc
?$x n>:$yc n class=3D"keyword">;


           
ault">$c =3D t">$d>$=
size
? $si=
ze
/$d an>: $size=
;


             
=3D"default">$av =3D "default">$x* t">$c;        =
//=D0=B2=D1=8B=D1=81=D0=BE=D1=82=D0=B0 =D0=B8=D1=
=81=D1=85=D0=BE=D0=B4=D0=BD=D0=BE=D0=B9 =D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=
=BD=D0=BA=D0=B8


             
=3D"default">$ah =3D "default">$y* t">$c;        =
//=D0=B4=D0=BB=D0=B8=D0=BD=D0=B0 =D0=B8=D1=81=D1=
=85=D0=BE=D0=B4=D0=BD=D0=BE=D0=B9 =D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=
=BA=D0=B8


       
}  =
  =



       
$im an>=3D imagecreat=
e
($av n>, $ah an class=3D"keyword">);


       
$im an>=3D imagecreat=
etruecolor
( >$av,$ah span>);


    if (
imagecopyresampled=
($im >,$imorig =
, 0 lass=3D"keyword">,0 keyword">,0 >,0, >$av, class=3D"default">$ah, =3D"default">$x, ault">$y))


        if (
imag=
ejpeg
($im<=
/span>, $save_dir=
.$save_nam=
e
))


            return
=3D"default">true;


            else


            return
=3D"default">false;


    }





?>





And now how using this function fast





<?php


if ($_POST=
[pic >])


{


$tmpname  ord">=3D $_FILES word">['pic' >]['tmp_name' ">];


@
img_resize >( $tmpname ">, 600 , =
"../album" =
,
"album_".=
$id. >".jpg");


@
img_resize >( $tmpname ">, 120 , =
"../album" =
,
"album_".=
$id. >"_small.jpg");


@
img_resize >( $tmpname ">, 60 , <=
/span>"../album" ,=
"album_".<=
/span>$id.=
"verysmall.jpg");


}


else


echo
"No Images uploaded via POST"<=
span class=3D"keyword">;


?>






andrvm at andrvm dot ru
14-Oct-2007 04:09


One more version of setMemoryForImage (see below)





<?php





function s=
etMemoryForImage
( fault">$filename)


{


  
$imageInfo    an>=3D getimagesi=
ze
($filena=
me
);


  
$memoryNeeded lass=3D"keyword">=3D round ass=3D"keyword">(($imageInfo class=3D"keyword">[0 "keyword">] * $imageInfo s=3D"keyword">[1 word">] * $imageInfo "keyword">['bits' word">] * $imageInfo "keyword">['channels' "keyword">] / 8 word">+ Pow >(2, n>16)) * <=
span class=3D"default">1.65
);


   =



  
$memoryLimit ass=3D"keyword">=3D (int) ini_get<=
span class=3D"keyword">(
'memory_limit' an>)*1048576 n>;





  if ((
memory_get_usage class=3D"keyword">() + $memoryNeeded n>) > $memoryL=
imit
)


   {


    
ini_set lass=3D"keyword">('memory_limit' an class=3D"keyword">,
ceil lass=3D"keyword">((memory_get_usage >() + $memoryNeed=
ed
+ $memo=
ryLimit
)/1=
048576
).'M'=
);


     return (
true pan class=3D"keyword">);


   }


   else return(
false n class=3D"keyword">);


}





?>


//work's it. no problem!






heshan at sjtu dot edu dot cn
24-Jul-2007 09:11


Create thumbnail in GIF format for JPEG and GIF ( with or without transp=
arency, for animated GIF, only the first frame is retained ) originals, =
thumbnails for PNG images should save in PNG format to support alpha tra=
nsparency.



For JPEG image and GIF without transparency, simply use imagecopyresized=
will be OK. For GIF with transparency, we should first understand the b=
ehavior of imagecopyresized: it extracts pixels that are not transparent=
from the specified rectangle area of the source image, resizs the recta=
ngle, probably does some color approximation, then copys to the target i=
mage. Suppose that you want to put a picture frame image( only the borde=
r is non-transparent ) over a photo( opaque ) to compose a final image, =
just imagecopyresize the picture frame image to the photo will be OK. To=
better understand the behavior, consider the case you want to copy seve=
ral GIF images with transparency together to form a new one, note that t=
he GIF image can only have one transparent color, if the old transparent=
colors are not dropped by imagecopyresize, it will be confused which co=
lor from the originals will be the transparent color in the final image.=
So imagecopyresize does the right thing. To this point, it is not hard =
to understand why some people get a black background when they want to c=
reate thumbnails for transparent GIF: the original transparent pixels ar=
e gone, and the non-transparent pixels are put onto an empty canvas( no =
color allocated ). Then we arrive



<?php



$im
=3D im=
agecreatefromgif
( tring">'test.gif' );

// or $im =3D imagecreatefromjpeg( 'test.=
jpg' );

$mw =3D span>360; =
// max width

$mh =3D span>360; =
// max height

$ow =3D span>imagesx( pan>$im );

$oh =3D span>imagesy( pan>$im );

if(
$ow &g=
t;
$mw || =
$oh > <=
/span>$mh ) {
/>
    if(
$ow lass=3D"keyword">> $oh ass=3D"keyword">) {

       
$tnw pan>=3D $mw >;

       
$tnh pan>=3D $tnw an>* $oh <=
span class=3D"keyword">/
$ow class=3D"keyword">;

    } else {

       
$tnh pan>=3D $mh >;

       
$tnw pan>=3D $tnh an>* $ow <=
span class=3D"keyword">/
$oh class=3D"keyword">;

    }

} else {

   
// although within siz=
e restriction, we still do the copy/resize process

    // which can make an animated GIF still

   
$tnw s=3D"keyword">=3D $ow "keyword">;

   
$tnh s=3D"keyword">=3D $oh "keyword">;

}

// the document recommends you to use tru=
ecolor to get better result

$imtn =3D =
imagecreatetruecolor "keyword">( $tnw word">, $tnh d">);

// if the image has transparent color, we=
first extract the RGB value of it,

// then use this color to fill the thumbnail image as the background. Th=
is color

// is safe to be assigned as the new transparent color later on because =
it will

// be filtered by imagecopyresize.

$originaltransparentcolor ass=3D"keyword">=3D imagecolortransparent=
( $im an>);

if(

   
$originaltransparentco=
lor
>=3D ">0 // -1 for opaque image

   
&& n class=3D"default">$originaltransparentcolor
ord">< imagecolorstotal ass=3D"keyword">( $im "keyword">)

   
// for animated GIF, i=
magecolortransparent will return a color index larger

    // than total colors, in this case the image is treat=
ed as opaque ( actually

    // it is opaque )

) {

   
$transparentcolor an>=3D imagecolor=
sforindex
( >$im, $ori=
ginaltransparentcolor
);

   
$newtransparentcolor <=
/span>=3D imageco=
lorallocate
(

       
$imtn pan>,

       
$transpa=
rentcolor
['=
red'
],

       
$transpa=
rentcolor
['=
green'
],

       
$transpa=
rentcolor
['=
blue'
]

    );

   
// for true color imag=
e, we must fill the background manually

   
imagefill class=3D"keyword">( $imtn ss=3D"keyword">, 0 eyword">, 0 >, $newtransparentcolor s=3D"keyword">);

   
// assign the transpar=
ent color in the thumbnail image

   
imagecolortransparent<=
/span>( $imtn an>, $newtranspar=
entcolor
);

}

// copy/resize as usual

imagecopyresized word">( $imtn d">, $im, =
0, =
0, lass=3D"default">0, "default">0, t">$tnw, $=
tnh
, $ow span>, $oh >);

imagegif( =
$imtn, pan>'test.thumbnail.gif' yword">);

imagedestroy ">( $im );=


imagedestroy ">( $imtn =
);



?>



Only do imagecolortransparent( $thumbnail, imagecolortransparent( $sourc=
e ) ); some times works, just because the color indexes for background t=
ransparent pixels in the two images happens to be the same.



PHP5.2.0 with GD bundled (2.0.28 compatible)






nils dot clark-bernhard at human-aspects dot de=

08-Jun-2007 04:52


Regarding ob at babcom dot biz's function Resize($Dir,$Image,$NewDir,$Ne=
wImage,$MaxWidth,$MaxHeight,$Quality)



Make sure to not use a quality of 9 or higher for png resizing.



PHP will output an error like:

fatal libpng error: zlib failed to initialize compressor

or

gd-png error: setjmp returns error condition






Halit Yesil mail at halityesil dot com=

23-Mar-2007 08:34


This Class image resize or crop,

your copyright text write on the image and your logo marge on the image.=




Full Class code =3D> nload.php?type=3Dsnippet&id=3D2188" rel=3D"nofollow" target=3D"_blan=
k">http://www.phpbuilder.com/snippet/download.php?type=3Dsnippet&id=3D=
2188


/**

     * Author         : Halit YE=
SIL

     * www            : www=
.halityesil.com, www.prografik.net, www.trteknik.net

     * email        : mail@halityesil=
.com, halit.yesil@prografik.net, halit.yesil@trteknik.net

     * GSM            : +90=
.535 648 3504

     * Create Date    : 21 / 03 / 2007

     *

     *

     * Script        : Image resize a=
nd croping class.

     *              &n=
bsp;   You can Write copyright text and attach your logo write on i=
mage with this class

     *

     *

     * $obj =3D new pg_image($arg);

     *

     *

     * Varibles Information

     *         [0] type =3D> =
(POST | FILE) =3D> Source File Send Type _FILES OR Dir

     *         [1] file =3D> =
({if POST Array file =3D $_FILES['yourfile']}|{if FILE false}) =3D> S=
ource File filesource

     *         [2] path =3D> =
({if FILE String [ dirname/filename.extension ]}) =3D> Source File Ro=
ot Path

     *         [3] target =3D>=
; ({if FILE String [ dirname/filename.extension ]}) =3D> Target File =
Root Path

     *         [4] width =3D>=
(integer) =3D> Target File Width

     *         [5] height =3D>=
; (integer) =3D> Target File Height

     *         [6] quality =3D&g=
t; (integer 1 - 100) =3D> Target File Quality 0-100 %

     *         [7] action =3D>=
; (crop | resize) =3D> Target Action "resize" OR "crop"

     *         [8] bordersize =3D=
> (integer 0-5) =3D> Target Border Size

     *         [9] bordercolor =3D=
> (color hex) =3D> Target Border Color

     *         [10] bgcolor =3D&=
gt; (color hex) =3D> Target Background Color

     *         [11] copytext =3D=
> (String) =3D> Copyright Content Text

     *         [12] copycolor =3D=
> (color hex) =3D> Copyright Text Color

     *         [13] copyshadow =3D=
> (color hex) =3D> Copyright Text Shadow color

     *         [14] copybgcolor =
=3D> (color hex) =3D> Copyright Background Color

     *         [15] copybgshadow=
=3D> (color hex) =3D> Copyright Background Shadow Color

     *         [16] copybordersi=
ze =3D> (integer 0-5) =3D> Copyright Border Size 1-3

     *         [17] copyborderco=
lor =3D> (color hex) =3D> Copyright Border Color

     *      [18] copyposition =3D> (top=
| topright | topleft | center | left | right | bottom | bottomright | b=
ottomleft) =3D> Copyright Position

     *         [19] logoposition=
=3D> (top | topright | topleft | center | left | right | bottom | bo=
ttomright | bottomleft) =3D> Logo Image Position

     *         [20] logoimage =3D=
> (String [ dirname/filename.extension] Allow Extension (PNG | GIF | =
JPG)) =3D> Logo Image Root Path "PNG" OR "GIF" OR "JPG"

     *

     *

     *

     *

     */



<?php



$source
=3D ( t">$_REQUEST[ ">'img'] !=3D g">'')?$_R=
EQUEST
['img=
'
]:'braille=
3.jpg'
;

   
$arg s=3D"keyword">=3Darray(     ">type =3D> g">'FILE',

                  &nbs=
p;
file =3D=
>
false,=


                   &nb=
sp;
path =3D=
>
$source >,

                   &nb=
sp;
target >=3D>'',=


                   &nb=
sp;
width =
=3D>
150=
,

                   &nb=
sp;
height >=3D>50=
,

                   &nb=
sp;
quality ">=3D>80 >,

                   &nb=
sp;
action >=3D>'resize' ord">,

                   &nb=
sp;
bordersize ord">=3D>1 d">,

                   &nb=
sp;
bordercolor word">=3D>'#00CCFF' "keyword">,

                   &nb=
sp;
bgcolor ">=3D>'#000000' yword">,

                   &nb=
sp;
copytext d">=3D>'Bodrum 1998' "keyword">,

                   &nb=
sp;
copycolor rd">=3D>'#FFFFFF' keyword">,

                   &nb=
sp;
//copyshadow =3D>'#000000',

                   &nb=
sp; //copybgcolor =3D>'#D0FFCC',

                   &nb=
sp; //copybgshadow =3D>'#656565',

                   &nb=
sp;
copybordersize keyword">=3D>0 yword">,

                   &nb=
sp;
copybordercolor "keyword">=3D>'#FFFFFF' ss=3D"keyword">,

                   &nb=
sp;
copyposition yword">=3D>'bottom' "keyword">,

                   &nb=
sp;
logoposition yword">=3D>'topleft' "keyword">,

                   &nb=
sp;
logoimage rd">=3D>'logo.png' "keyword">);

   

   
//$arg =3D "$source,,4=
00,300,80,resize";

   
new =3D"default">pg_image( "default">$arg);



?>






feip at feip dot net
15-Nov-2006 04:23


This code convert images to thumbs.

How he work -

Check source image - Width and Height,

crop a maximum from original image,

resize croped to user defined size



// makeIcons_MergeCenter($src, $dst, $dstx, $dsty);



<?php



function m=
akeIcons_MergeCenter
( "default">$src, ault">$dst, ">$dstx, $=
dsty
){



//$src =3D original image location

//$dst =3D destination image location

//$dstx =3D user defined width of image

//$dsty =3D user defined height of image



$allowedExtensions keyword">=3D 'jpg jpeg gif png' n class=3D"keyword">;



$name =3D =
explode( span>".", <=
span class=3D"default">$src
);

$currentExtensions keyword">=3D $name eyword">[count rd">($name=
)-
1];
>
$extensions ">=3D explode d">(" ", span>$allowedExtensions word">);



for(
$i=3D<=
/span>0; <=
span class=3D"default">count
( class=3D"default">$extensions
)> >$i; class=3D"default">$i=3D s=3D"default">$i+ fault">1){

if(
$extensions rd">[$i]=3D=
=3D
$currentExtensions "keyword">)

{
$extensionOK rd">=3D1; =


$fileExtension rd">=3D$extensions eyword">[$i >];

break; }

}



if(
$extensionOK ord">){



$size =3D =
getImageSize ">($src);<=
br />
$width =3D=
$size[ pan>0];

$height =3D=
$size[ pan>1];



if(
$width =
>=3D
$dstx rd">AND $height word">>=3D $dsty keyword">){



$proportion_X rd">=3D $width ord">/ $dstx ">;

$proportion_Y rd">=3D $height word">/ $dsty d">;



if(
$proportion_X yword">> $proportion_Y ass=3D"keyword">){

$proportion ">=3D $proportion_Y keyword">;

}else{

$proportion ">=3D $proportion_X "keyword">;

}

$target[ span>'width'] =3D =
$dstx * span>$proportion;=


$target[ span>'height'] =3D=
$dsty * <=
/span>$proportion=
;



$original[=
'diagonal_center' word">] =3D

round( an>sqrt((<=
span class=3D"default">$width
* n class=3D"default">$width
)+( class=3D"default">$height
* lass=3D"default">$height))/ lass=3D"default">2);

$target[ span>'diagonal_center' rd">] =3D

round( an>sqrt((<=
span class=3D"default">$target
[ an class=3D"string">'width'
]* class=3D"default">$target
[ lass=3D"string">'width'])+

(
$target[<=
/span>'height']* span>$target[ an>'height']))/ pan>2);



$crop =3D =
round( an>$original[ an>'diagonal_center' ">] - $target d">['diagonal_center' "keyword">]);



if(
$proportion_X yword">< $proportion_Y ass=3D"keyword">){

$target[ span>'x'] =3D an>0;

$target[ span>'y'] =3D an>round((( >$height/<=
span class=3D"default">2
)* ass=3D"default">$crop)/ =3D"default">$target[ "string">'diagonal_center']);

}else{

$target[ span>'x'] =3D =
;
round(((=
$width/ pan>2)* an class=3D"default">$crop)/ class=3D"default">$target[ ass=3D"string">'diagonal_center']);
=

$target[ span>'y'] =3D an>0;

}



if(
$fileExtension eyword">=3D=3D "jpg" "keyword">OR $fileExtension lass=3D"keyword">=3D=3D'jpeg' class=3D"keyword">){

$from =3D =
ImageCreateFromJpeg keyword">($src rd">);

}elseif (
$fileExtension s=3D"keyword">=3D=3D "gif" ss=3D"keyword">){

$from =3D =
ImageCreateFromGIF eyword">($src d">);

}elseif (
$fileExtension s=3D"keyword">=3D=3D 'png' ss=3D"keyword">){

 
$from ">=3D imageCreateFromPNG s=3D"keyword">($src keyword">);

}



$new =3D <=
/span>ImageCreateTrueColor "keyword">($dstx word">,$dsty ">);



imagecopyresampled keyword">($new rd">,  $from yword">,  0 word">, 0,=
$target[<=
/span>'x'],
=

$target[ span>'y'], =
$dstx, an class=3D"default">$dsty
, class=3D"default">$target[ ass=3D"string">'width'], ss=3D"default">$target[ =3D"string">'height']);



 if(
$fileExtension s=3D"keyword">=3D=3D "jpg" ass=3D"keyword">OR $fileExtension =
=3D=3D 'jpeg' n>){

imagejpeg(=
$new, an>$dst, <=
span class=3D"default">70
);

}elseif (
$fileExtension s=3D"keyword">=3D=3D "gif" ss=3D"keyword">){

imagegif(<=
/span>$new, n>$dst);

}elseif (
$fileExtension s=3D"keyword">=3D=3D 'png' ss=3D"keyword">){

imagepng(<=
/span>$new, n>$dst);

}

}

}

}



?>






kyle dot florence at gmail dot com
15-Sep-2006 06:38


The function below will resize an image based on max width and height, t=
hen it will create a thumbnail image from the center of the resized imag=
e of a width and height specified.  This function will not resize t=
he image to max_w pixels by max_h pixels, those are only the max width's=
and heights the image can be, it resizes the image to the first 1:1 rat=
io below max_w and max_h.



For example, if you have an image that is 800x600 and you specify your n=
ew image to be 400x200, it will resize based on the smallest number (in =
this case 200) and maintain the images 1:1 ratio.  So your final im=
age would end up at something like 262x200.



UPDATE:  I have updated this function, I added the 'newdir' option =
in case you want the images saved in a different directory than the scri=
pt.  I also fixed the thumbnail slice so it is perfectly in the cen=
ter now and fixed the bug that 'ob at babcom dot biz' mentioned so you c=
an safely resize based on width or height now.



<?

/**********************************************************

 * function resizejpeg:

 *

 *  =3D creates a resized image based on the max width

 *    specified as well as generates a thumbnail from
/>
 *    a rectangle cut from the middle of the image.
=

 *

 *    @dir    =3D directory image is stored in<=
br />
 *    @newdir =3D directory new image will be stored in r />
 *    @img    =3D the image name

 *    @max_w  =3D the max width of the resized image=


 *    @max_h  =3D the max height of the resized imag=
e

 *    @th_w   =3D the width of the thumbnail />
 *    @th_h   =3D the height of the thumbnail r />
 *

 **********************************************************/



function resizejpeg($dir, $newdir, $img, $max_w, $max_h, $th_w, $th_h) r />
{

    // set destination directory

    if (!$newdir) $newdir =3D $dir;



    // get original images width and height

    list($or_w, $or_h, $or_t) =3D getimagesize($dir.$img)=
;



    // make sure image is a jpeg

    if ($or_t =3D=3D 2) {

   

        // obtain the image's ratio

        $ratio =3D ($or_h / $or_w);



        // original image

        $or_image =3D imagecreatefromjpeg($dir.=
$img);



        // resize image?

        if ($or_w > $max_w || $or_h > $ma=
x_h) {



            // resize by height, then=
width (height dominant)

            if ($max_h < $max_w) {=


                $rs_h =3D $=
max_h;

                $rs_w =3D $=
rs_h / $ratio;

            }

            // resize by width, then =
height (width dominant)

            else {

                $rs_w =3D $=
max_w;

                $rs_h =3D $=
ratio * $rs_w;

            }



            // copy old image to new =
image

            $rs_image =3D imagecreate=
truecolor($rs_w, $rs_h);

            imagecopyresampled($rs_im=
age, $or_image, 0, 0, 0, 0, $rs_w, $rs_h, $or_w, $or_h);

        }

        // image requires no resizing

        else {

            $rs_w =3D $or_w;

            $rs_h =3D $or_h;



            $rs_image =3D $or_image;<=
br />
        }



        // generate resized image

        imagejpeg($rs_image, $newdir.$img, 100)=
;



        $th_image =3D imagecreatetruecolor($th_=
w, $th_h);



        // cut out a rectangle from the resized=
image and store in thumbnail

        $new_w =3D (($rs_w / 2) - ($th_w / 2));=


        $new_h =3D (($rs_h / 2) - ($th_h / 2));=




        imagecopyresized($th_image, $rs_image, =
0, 0, $new_w, $new_h, $rs_w, $rs_h, $rs_w, $rs_h);



        // generate thumbnail

        imagejpeg($th_image, $newdir.'thumb_'.$=
img, 100);



        return true;

    }



    // Image type was not jpeg!

    else {

        return false;

    }

}

?>



Example:



<?php

$dir
=3D '.=
/'
;

$img =3D <=
/span>'test.jpg';<=
br />


resizejpeg=
(
$dir, pan>'', an class=3D"default">$img, lass=3D"default">600, "default">400, ult">300, =
150
);

?>



The example would resize the image 'test.jpg' into something 600x400 or =
less (retains the 1:1 ratio of the image) and creates the file 'thumb_te=
st.jpg' at 300x150.






nworld3d at yahoo dot com
23-Aug-2006 05:06


Belows is the code snipet that allows you to resize a transparent PNG an=
d composite it into another image.  The code is tested to work with=
PHP5.1.2, GD2, but I think it can also work with other versions of PHP =
and GD. 



The code has been commented to help you read through it.  The idea =
of resizing the transparent PNG image is to create a new destination ima=
ge which is completely transparent then turn off the imageAlphaBlending =
of this new image so that when the PNG source file is copied, its alpha =
channel is still retained.



<?php

/**

 * Compose a PNG file over a src file.

 * If new width/ height are defined, then resize the PNG (and keep =
all the transparency info)

 * Author:  Alex Le - "nofollow" target=3D"_blank">http://www.alexle.net

 */

function i=
mageComposeAlpha
( & =3D"default">$src, & s=3D"default">$ovr, "default">$ovr_x, efault">$ovr_y, ault">$ovr_w =3D fault">false, lt">$ovr_h =3D ult">false)

{

    if(
$ovr_w n class=3D"keyword">&&
$ovr_h pan>)

       
$ovr pan>=3D imageResi=
zeAlpha
( $=
ovr
, $ovr_=
w
, $ovr_h =
);

       

   
/* Noew compose the 2 =
images */

   
imagecopy class=3D"keyword">($src =3D"keyword">, $ovr keyword">, $ovr_x yword">, $ovr_y ord">, 0, =
0, =
imagesx( pan class=3D"default">$ovr
), class=3D"default">imagesy
( lass=3D"default">$ovr) );    r />
}



/**

 * Resize a PNG file with transparency to given dimensions

 * and still retain the alpha channel information

 * Author:  Alex Le - "nofollow" target=3D"_blank">http://www.alexle.net

 */

function i=
mageResizeAlpha
(& "default">$src, ault">$w, =
$h
)

{

       
/* creat=
e a new image with the new width and height */

       
$temp span>=3D imagecre=
atetruecolor
( t">$w, $h<=
/span>);

       

       
/* makin=
g the new image transparent */

       
$backgro=
und
=3D im=
agecolorallocate
( fault">$temp, lt">0, 0 span>, 0 pan class=3D"keyword">);

       
ImageCol=
orTransparent
( lt">$temp, >$background); ent">// make the new temp image all transparent

       
imagealp=
hablending
( >$temp, fa=
lse
); // t=
urn off the alpha blending to keep the alpha channel

       

        /* Resize the PNG file */

        /* use imagecopyresized to gain some pe=
rformance but loose some quality */

       
imagecop=
yresized
($=
temp
, $src=
, 0=
, 0 lass=3D"keyword">, 0 "keyword">, 0 d">, $w, <=
/span>$h, =
imagesx( pan class=3D"default">$src
), class=3D"default">imagesy
( lass=3D"default">$src));

       
/* use i=
magecopyresampled if you concern more about the quality */

        //imagecopyresampled($temp, $src, 0, 0,=
0, 0, $w, $h, imagesx($src), imagesy($src));

       
return <=
/span>$temp;
>
}

?>

Example usage:



<?php

header
('Con=
tent-type: image/png'
);



/* Open the photo and the overlay image *=
/

$photoImage ">=3D ImageCreateFromJPEG ss=3D"keyword">('images/MiuMiu.jpg'=
);

$overlay =3D=
ImageCreateFromPNG keyword">('images/hair-trans.png' pan class=3D"keyword">);



$percent =3D=
0.8;
>
$newW =3D =
ceil( n>imagesx(=
$overlay) * n>$percent);
>
$newH =3D =
ceil( n>imagesy(=
$overlay) * n>$percent);
>


/* Compose the overlay photo over the tar=
get image */

imageComposeAlpha yword">( $photoImage "keyword">, $overlay "keyword">, 86 rd">, 15, =
$newW, pan>$newH );
>


/* Open another PNG file, then resize and=
compose it */

$watermark >=3D imagecreatefrompng =3D"keyword">('images/watermark.png' >);

imageComposeAlpha yword">( $photoImage "keyword">, $watermark "keyword">, 10 rd">, 20, =
imagesx( span>$watermark)/=
2, =
imagesy( pan class=3D"default">$watermark
)/=
2 );



/**

 * Open the same PNG file then compose without resizing

 * As the original $watermark is passed by reference, it was resize=
d already.

 * So we have to reopen it.

 */

$watermark >=3D imagecreatefrompng =3D"keyword">('images/watermark.png' >);

imageComposeAlpha yword">( $photoImage "keyword">, $watermark "keyword">, 80 rd">, 350)=
;

Imagepng(<=
/span>$photoImage=
);
// output to browser



ImageDestroy ">($photoImage rd">);

ImageDestroy ">($overlay >);

ImageDestroy ">($watermark d">);

?>






ob at babcom dot biz
21-Aug-2006 04:32


Regarding the note and function of kyle.florence on August 3rd 2006:
/>


I tried to use his function resizejpeg() for resizing images in my galle=
ry. As far as I can tell it contains a small bug.



Resizing worked fine as long as I had the same maximum width and maximum=
height specified. Wanting all thumbnails to have the same height - so m=
y images would appear in a straight line on my website both in portrait =
format and in landscape format - I soon encountered the problem that res=
izing with different values of maximum width and maximum height would no=
t work proberly.



If you are using the script change the following 2 lines where the resiz=
ed width and the resized height are calculated:



<?php

$rs_h
=3D =
$ratio
* $=
max_h
;

?>

should be:

<?php

$rs_h
=3D =
$ratio
* $=
rs_w
;

?>



and:

<?php

$rs_w
=3D =
$max_w
/ $=
ratio
;

?>

should be:

<?php

$rs_w
=3D =
$rs_h
/ $r=
atio
;

?>



The following function is based on Kyle Florence's function. I left out =
the thumbnail-part and rather added the possibiliy of defining a new dir=
and new filename for the image. If you need to resize and then create a=
thumbnail just run the function twice. Here, the thumbnail will contain=
the full picture and not a cutout of the original image.



The function supports JPG, GIF and PNG resizing. The quality in case of =
JPG is given to the function as the last parameter $Quality.



The variable names should speak for their usage.



<?php

function R=
esize
($Dir=
,$Image pan>,$NewDir n>,$NewImage n>,$MaxWidth n>,$MaxHeight an>,$Quality n>) {

  list(
$ImageWidth =3D"keyword">,$ImageHeight ass=3D"keyword">,$TypeCode ass=3D"keyword">)=3Dgetimagesize pan class=3D"keyword">(
$Dir lass=3D"keyword">.$Image s=3D"keyword">);

 
$ImageType yword">=3D($TypeCode "keyword">=3D=3D1 yword">?"gif" ">:($TypeCode d">=3D=3D2=
?
"jpeg": />
             (
efault">$TypeCode=3D=3D =3D"default">3? ng">"png":=
FALSE
)));

 
$CreateFunction "keyword">=3D"imagecreatefrom" class=3D"keyword">.
$ImageType n class=3D"keyword">;

 
$OutputFunction "keyword">=3D"image" keyword">.$ImageType "keyword">;

  if (
$ImageType "keyword">) {

   
$Ratio ss=3D"keyword">=3D($ImageHeight an class=3D"keyword">/
$ImageWidth<=
span class=3D"keyword">);

   
$ImageSource an class=3D"keyword">=3D
$CreateFunction span>($Dir=
.$Image an class=3D"keyword">);

    if (
$ImageWidth >> $MaxWidth <=
/span>|| $ImageHe=
ight
> =
$MaxHeight
) {

      if (
$ImageWidth=
> $Max=
Width
) {

        
$Resize=
dWidth
=3D$=
MaxWidth
;

        
$Resize=
dHeight
=3D=
$ResizedWidth
* lt">$Ratio;

      }

      else {

       
$Resized=
Width
=3D$I=
mageWidth
;

       
$Resized=
Height
=3D$=
ImageHeight
;

      }       

      if (
$ResizedHei=
ght
> $=
MaxHeight
) {

       
$Resized=
Height
=3D$=
MaxHeight
;

       
$Resized=
Width
=3D$R=
esizedHeight
/ t">$Ratio;

      }      

     
$ResizedImage span>=3Dimagecrea=
tetruecolor
( ">$ResizedWidth, ault">$ResizedHeight);

     
imagecopyresamp=
led
($Resiz=
edImage
,$I=
mageSource
, >0,0 >,0 lass=3D"keyword">,0 keyword">,$ResizedWidth =3D"keyword">,

                   &nb=
sp;    
$ResizedHeight pan class=3D"keyword">,
$ImageWidth=
,$ImageHeight an>);

    }

    else {

     
$ResizedWidth span>=3D$ImageWid=
th
;

     
$ResizedHeight<=
/span>=3D$ImageHe=
ight
;     

     
$ResizedImage span>=3D$ImageSou=
rce
;

    }   

   
$OutputFunction=
($ResizedImage pan>,$NewDir n>.$NewImage n>,$Quality >);

    return
true n class=3D"keyword">;

  }   

  else

    return
false an class=3D"keyword">;

}

?>



Before calling the function support for JPG, PNG or GIF should be checke=
d.






hodgman at ali dot com dot au
08-Aug-2006 04:37


Users of this function should be aware that this function can return fal=
se in certain circumstances! I am assuming this is an indicator of failu=
re.



None of the example code displayed in these notes takes this into accoun=
t, so all of these examples contain weaknesses that could crash a progra=
m if not used with care.



However, it is not documented what kinds situations will cause it to fai=
l, and what side effects (if it is not atomic) occur if the operation fa=
ils, so we will have to wait for the documentation to be updated before =
this function can be used in rock-solid (crash-proof) code.



[[I posted this information earlier, but I phrased it as a question so i=
t was removed by the editors]]






kyle(dot)florence(_[at]_)gmail(dot)com=

03-Aug-2006 06:43


The function below will resize an image based on max width and height, t=
hen it will create a thumbnail image from the center of the resized imag=
e of a width and height specified.



<?php

/****************************************=
******************

 * function resizejpeg:

 *

 *  =3D creates a resized image based on the max width

 *    specified as well as generates a thumbnail from
/>
 *    a rectangle cut from the middle of the image.
=

 *

 *    @dir   =3D directory image is stored in r />
 *    @img   =3D the image name

 *    @max_w =3D the max width of the resized image
=

 *    @max_h =3D the max height of the resized image
>
 *    @th_w  =3D the width of the thumbnail

 *    @th_h  =3D the height of the thumbnail

 *

 **********************************************************/



function r=
esizejpeg
(=
$dir
, $img=
, $max_w span>, $max_h an>, $th_w=
, $th_h an class=3D"keyword">)

{

   
// get original images=
width and height

   
list( s=3D"default">$or_w, "default">$or_h, fault">$or_t) =3D efault">getimagesize( "default">$dir. ult">$img);



   
// make sure image is =
a jpeg

   
if ( =3D"default">$or_t =3D=3D ass=3D"default">2) {

   

       
// obtai=
n the image's ratio

       
$ratio <=
/span>=3D ($or_h =
/ $or_w pan>);



       
// origi=
nal image

       
$or_imag=
e
=3D imag=
ecreatefromjpeg
( ault">$dir. >$img);



       
// resiz=
e image

       
if ( an>$or_w > pan>$max_w || pan>$or_h > span>$max_h) { />


           
ment">// first resize by width (less than $max_w)

           
word">if ($or_w word">> $max_w yword">) {

               
n class=3D"default">$rs_w
=3D n class=3D"default">$max_w
;

               
n class=3D"default">$rs_h
=3D n class=3D"default">$ratio
* class=3D"default">$max_h
;

            } else {

               
n class=3D"default">$rs_w
=3D n class=3D"default">$or_w
;

               
n class=3D"default">$rs_h
=3D n class=3D"default">$or_h;

            }



           
ment">// then resize by height (less than $max_h)

           
word">if ($rs_h word">> $max_h yword">) {

               
n class=3D"default">$rs_w =3D n class=3D"default">$max_w / class=3D"default">$ratio;

               
n class=3D"default">$rs_h =3D n class=3D"default">$max_h;

            }



           
ment">// copy old image to new image

           
ault">$rs_image =3D "default">imagecreatetruecolor( an class=3D"default">$rs_w, class=3D"default">$rs_h);

           
ault">imagecopyresampled( ss=3D"default">$rs_image, ass=3D"default">$or_image, lass=3D"default">0, "default">0, t">0, 0 pan>, $rs_w
>, $rs_h pan class=3D"keyword">, $or_w class=3D"keyword">, $or_h ass=3D"keyword">);

        } else {

           
ault">$rs_w =3D ault">$or_w;

           
ault">$rs_h =3D ault">$or_h;



           
ault">$rs_image =3D "default">$or_image;

        }

   

       
// gener=
ate resized image

       
imagejpe=
g
($rs_imag=
e
, $dir
pan>.$img<=
span class=3D"keyword">, 100 class=3D"keyword">);



       
$th_imag=
e
=3D imag=
ecreatetruecolor
( fault">$th_w, lt">$th_h);



       
// cut o=
ut a rectangle from the resized image and store in thumbnail

       
$new_w <=
/span>=3D (($rs_w=
/ 4 >));

       
$new_h <=
/span>=3D (($rs_h=
/ 4 >));



       
imagecop=
yresized
($=
th_image
, =
$rs_image
, >0, 0
n>, $new_w=
, $new_h pan class=3D"keyword">, $rs_w class=3D"keyword">, $rs_h ass=3D"keyword">, $rs_w =3D"keyword">, $rs_h "keyword">);



       
// gener=
ate thumbnail

       
imagejpe=
g
($th_imag=
e
, $dir
pan>.'thumb_'
n>.$img an class=3D"keyword">, 100 ass=3D"keyword">);



        return
t=
rue
;

    }

   

   
// Image type was not =
jpeg!

   
else {

        return
f=
alse
;

    }

}

?>



Example:



<?php

$dir
=3D '.=
/'
;

$img =3D <=
/span>'test.jpg';<=
br />


resizejpeg=
(
$dir, pan>$img, =
600, class=3D"default">600
, s=3D"default">300, default">150);

?>



The example would resize the image 'test.jpg' into something 600x600 or =
less (1:1 ratio) and create the file 'thumb_test.jpg' at 300x150.
=






06madsenl at westseneca dot wnyric dot org ong>
21-Apr-2006 06:05


I was fiddling with this a few days trying to figure out how to resize t=
he original images on my website, but this site:



ofollow" target=3D"_blank">http://www.sitepoint.com/article/image-resizi=
ng-php




Has a great tutorial on using PHP to resize images without creating thum=
bnails.  It was exactly what I was looking to do.






konteineris at yahoo dot com
15-Feb-2006 06:42


Function creates a thumbnail from the source image, resizes it so that i=
t fits the desired thumb width and height or fills it grabbing maximum i=
mage part and resizing it, and lastly writes it to destination



<?



function thumb($filename, $destination, $th_width, $th_height, $forcefil=
l)

{   

   list($width, $height) =3D getimagesize($filename);



   $source =3D imagecreatefromjpeg($filename);



   if($width > $th_width || $height > $th_height){
=

      $a =3D $th_width/$th_height;

      $b =3D $width/$height;



      if(($a > $b)^$forcefill)

      {

         $src_rect_width  =3D $a * $height=
;

         $src_rect_height =3D $height;

         if(!$forcefill)

         {

            $src_rect_width =3D $widt=
h;

            $th_width =3D $th_height/=
$height*$width;

         }

      }

      else

      {

         $src_rect_height =3D $width/$a;

         $src_rect_width  =3D $width;
>
         if(!$forcefill)

         {

            $src_rect_height =3D $hei=
ght;

            $th_height =3D $th_width/=
$width*$height;

         }

      }



      $src_rect_xoffset =3D ($width - $src_rect_widt=
h)/2*intval($forcefill);

      $src_rect_yoffset =3D ($height - $src_rect_hei=
ght)/2*intval($forcefill);



      $thumb  =3D imagecreatetruecolor($th_widt=
h, $th_height);

      imagecopyresized($thumb, $source, 0, 0, $src_r=
ect_xoffset, $src_rect_yoffset, $th_width, $th_height, $src_rect_width, =
$src_rect_height);



      imagejpeg($thumb,$destination);

   }

}



?>






jesse at method studios
04-Oct-2005 12:07


imagecopyresized() does not do any resampling.  This makes it extre=
mely quick.  If quality is an issue, use imagecopyresampled(). n>





MaLaZ
11-Aug-2005 07:24


simple script for creating thumbnails with process information and savin=
g original ratio thumbnail to new destination...good then useing with up=
load or uploaded images:



<?php



//Upload---------------------------------=
---

if(isset( =
$submit
))

{

if (
$_FILES >['imagefile' ">]['type']=
=3D=3D
"image/jpeg" keyword">){

   
copy s=3D"keyword">($_FILES "keyword">['imagefile' "keyword">]['tmp_name' "keyword">], "../images/" s=3D"keyword">.$_FILES "keyword">['imagefile' "keyword">]['name' yword">])

    or die (
"Could not copy=
"
);

        echo
"" span>;

        echo
"Ima=
ge Name: "
. >$_FILES['i=
magefile'
][=
'name'
].""<=
/span>;

        echo
"<=
;br>Image Size: "
. "default">$_FILES[ tring">'imagefile'][ "string">'size']. ring">"";

        echo
"<=
;br>Image Type: "
. "default">$_FILES[ tring">'imagefile'][ "string">'type']. ring">"";

        echo
"<=
;br>Image Copy Done....<br>"
; />
        }

         else {

            echo
"string">"<br><br>";

            echo
"string">"bad file type (". lass=3D"default">$_FILES[ ss=3D"string">'imagefile'][ lass=3D"string">'name']. s=3D"string">")<br>";exit;

              }

//-----upload end



//------start thumbnailer



   
$thumbsize class=3D"keyword">=3D
120 ss=3D"keyword">;

    echo
"Thumbnail Info: &=
lt;br>

         1.Thumb defined size: - OK: $thumbsize=
<br>"
;

   
$imgfile class=3D"keyword">=3D "../images/$imagefil=
e_name"
;//=
processed image

   
echo s=3D"string">"

         2.Image destination: - OK: $imgfile<=
;br>"
;

   
header ss=3D"keyword">('Content-type: image/jpeg'=
);

    list(
$width n class=3D"keyword">,
$height class=3D"keyword">) =3D
getimagesize an>($imgfile n>);

    echo
"3.Image size - OK=
: W=3D$width x H=3D$height<br>"
; />
   
$imgratio class=3D"keyword">=3D$width lass=3D"keyword">/$height ss=3D"keyword">;

    echo
"3.Image ratio - O=
K: $imgratio<br>"
;

    if (
$imgratio pan class=3D"keyword">>
1 lass=3D"keyword">){

     
$newwidth n>=3D $thumbsize<=
/span>;

     
$newheight an>=3D $thumbsize=
/$imgratio=
;}

    else{

     
$newheight an>=3D $thumbsize=
;

     
$newwidth n>=3D $thumbsize<=
/span>*$imgratio<=
/span>;}

    echo
"4.Thumb new size =
-OK: W=3D$newwidth x H=3D$newheight<br>"
ord">;

   
$thumb ass=3D"keyword">=3D ImageCreateTrueColor<=
/span>($newwidth<=
/span>,$newheight=
);

    echo
"5.TrueColor - OK&=
lt;br>"
;

   
$source lass=3D"keyword">=3D imagecreatefromjpeg<=
/span>($imgfile span>);

    echo
"6.From JPG - OK&l=
t;br>"
;

   
imagecopyresized >($thumb pan class=3D"keyword">, $source an class=3D"keyword">,
0 s=3D"keyword">, 0 yword">, 0=
,
0, n>$newwidth, an>$newheight, span>$width, an>$height);
>
   
imagejpeg class=3D"keyword">($thumb ss=3D"keyword">,"../images/thumbs/thumb_$i=
magefile_name"
, ult">100);echo ng">"7.Done... - OK<br>";

//-----------end--------------  &nbs=
p;

?>



or without any info, just resizing:



<?php

//------start thumbnailer

  
$thumbsize =3D"keyword">=3D120 keyword">;

  
$imgfile "keyword">=3D "../images/$imagefile_name"<=
/span>;

  
header keyword">('Content-type: image/jpeg' >);

   list(
$width s=3D"keyword">, $height =3D"keyword">) =3D getimagesize an class=3D"keyword">(
$imgfile n class=3D"keyword">);

  
$imgratio "keyword">=3D$width keyword">/$height yword">;

   if (
$imgratio ass=3D"keyword">>1 "keyword">){

    
$newwidth n class=3D"keyword">=3D
$thumbsize=
;

    
$newheight an class=3D"keyword">=3D
$thumbsize >/$imgratio >;}

   else{

    
$newheight an class=3D"keyword">=3D
$thumbsize >;

    
$newwidth n class=3D"keyword">=3D
$thumbsize=
*$imgratio=
;}

  
$thumb "keyword">=3D ImageCreateTrueColor=
($newwidth=
,$newheight >);

  
$source "keyword">=3D imagecreatefromjpeg<=
span class=3D"keyword">(
$imgfile pan class=3D"keyword">);

  
imagecopyresized class=3D"keyword">(
$thumb ass=3D"keyword">, $source ss=3D"keyword">, 0 eyword">, 0 >, 0, an>0, n class=3D"default">$newwidth, an class=3D"default">$newheight
, <=
span class=3D"default">$width
, an class=3D"default">$height
);

imagejpeg(=
$thumb, pan>"../images/thumbs/thumb_$imagefile_name" n>,100 n class=3D"keyword">);

//-----------end--------------  =
;

?>



i hope it helps.






FearINC at gmail dot com
10-Aug-2005 10:35


I wrote a function not long ago that creates a thumbnail out of a large =
picture. Unlike other notes on this page, the code is a function so it c=
an be used many times on the same script. The function allows the progra=
mer to set max height and width and resizes the picture proportionally.<=
br />
<?php

function s=
aveThumbnail
( t">$saveToDir, ult">$imagePath, fault">$imageName, default">$max_x, fault">$max_y) {

   
preg_match class=3D"keyword">(
"'^(.*)\.(gif|jpe?g|pn=
g)$'i"
, $i=
mageName
, =
$ext
);

    switch (
strtolower an>($ext pan class=3D"keyword">[2 s=3D"keyword">])) {

        case
'jpg=
'
:

        case
'jpe=
g'
: $im&nb=
sp; 
=3D lt">imagecreatefromjpeg ( ss=3D"default">$imagePath);

                   &nb=
sp; break;

        case
'gif=
'
: $im&nb=
sp; 
=3D lt">imagecreatefromgif  ( n class=3D"default">$imagePath);

                   &nb=
sp; break;

        case
'png=
'
: $im&nb=
sp; 
=3D lt">imagecreatefrompng  ( n class=3D"default">$imagePath);

                   &nb=
sp; break;

        default    :
ss=3D"default">$stop =3D ss=3D"default">true;

                   &nb=
sp; break;

    }

   

    if (!isset(
$stop >)) {

       
$x
n>=3D imagesx an>($im an class=3D"keyword">);

       
$y
n>=3D imagesy an>($im an class=3D"keyword">);

   

        if ((
$ma=
x_x
/$max_y=
) < ($x=
/$y=
)) {

           
ault">$save =3D ault">imagecreatetruecolor( lass=3D"default">$x/( "default">$x/ t">$max_x), ">$y/($x span>/$max_x n>));

        }

        else {

           
ault">$save =3D ault">imagecreatetruecolor( lass=3D"default">$x/( "default">$y/ t">$max_y), ">$y/($y span>/$max_y n>));

        }

       
imagecop=
yresized
($=
save
, $im<=
/span>, 0<=
span class=3D"keyword">,
0 ass=3D"keyword">, 0 keyword">, 0 ">, imagesx >($save), =
imagesy( span>$save), an>$x, an class=3D"default">$y);

       

       
imagegif=
($save an>, "{$saveToDir}=
{$ext[1]}.gif"
);

       
imagedes=
troy
($im span>);

       
imagedes=
troy
($save=
);

    }

}

?>



the function for now takes only jpg,gif and png files, but that can easi=
ly be changed.

It's an easy to use easy to understand function and I hope it will come =
useful to someone.






mecdesign at hotmail dot com
07-Aug-2005 02:51


This code will resize your images if your image needs to fit (without st=
retching) into a max height / width destination image that is not a 1:1 =
ratio (mine was 4:3).



<?

   // Ratios

   $image_ratio =3D $width / $height; // Actual image's ratio<=
br />
   $destination_ratio =3D $max_width / $max_height; // Ratio o=
f dest. placeholder

  

    // Taller

    if($image_ratio < $destination_ratio)

    {

        //Too tall:

        if($height > $max_height)

        {

            $height =3D $max_height;<=
br />
            $width =3D ceil($height /=
$image_ratio);

        }

    }

    // Wider / balanced & too wide:

    else if ($width > $max_width)

    {

        $width =3D $max_width;

        $height =3D ceil($width / $image_ratio)=
;

    }

?>






saurabh at saurabh dot com
22-Jul-2005 04:57


URGENT!



I am trying to make thumbnails of image(png, jpg, gif)...



Not a single code is working. Do we have to make any changes in php.ini?=




which version of gd is required can anybody xplain me whole thing. >





brian <dot> tyler <at> gmail <do=
t> com

12-Jun-2005 03:53


I spent last night getting unsuccessful results from this function until=
I found this note of fluffle <<at>> gmail on the imagecopyr=
esampled page, I have made a slight modification, so you can just cut an=
d paste.



Just to clarify that src_w and src_h do not necessarily need to be the s=
ource image width and height, as they specify the size of the rectangle =
cropped from the source picture, with its top left corner situated at (s=
rc_x, src_y).



For example, the code below crops a jpeg image to be square, with the sq=
uare situated in the centre of the original image, and then resizes it t=
o a 100x100 thumbnail.



function ($image_filename, $thumb_location, $image_thumb_size){

//@$image_filename - the filename of the image you want

//to get a thumbnail for (relative to location of this

//function).

//@$thumb_location - the url (relative to location of this

//function) to save the thumbnail.

//@$image_thumb_size - the x-y dimension of your thumb

//in pixels.



   list($ow, $oh) =3D getimagesize($image_filename);

   $image_original =3D imagecreatefromjpeg($image_filename); r />
   $image_thumb =3D imagecreatetruecolor($image_thumb_size,$im=
age_thumb_size);

if ($ow > $oh) {

   $off_w =3D ($ow-$oh)/2;

   $off_h =3D 0;

   $ow =3D $oh;

} elseif ($oh > $ow) {

   $off_w =3D 0;

   $off_h =3D ($oh-$ow)/2;

   $oh =3D $ow;

} else {

   $off_w =3D 0;

   $off_h =3D 0;

}

imagecopyresampled($image_thumb, $image_original, 0, 0, $off_w, $off_h, =
100, 100, $ow, $oh);



imagejpeg($image_thumb, $thumb_location);

}//end function






no at name dot com
18-May-2005 04:45


I was searching for script, that do not resize on the fly, but copy resi=
zed file to other place, so after long searches, i've done this function=
. I hope it will be usefull for someone:

(This is not original code, i'v taked it from somwhere and edited a ltl =
:)

<?php

function r=
esize
($cur=
_dir
, $cur=
_file
, $ne=
wwidth
, $o=
utput_dir
)

{

   
$dir_name class=3D"keyword">=3D
$cur_dir an class=3D"keyword">;

    $olddir lass=3D"keyword">=3D getcwd lass=3D"keyword">();

   
$dir s=3D"keyword">=3D opendir ss=3D"keyword">($dir_name ss=3D"keyword">);

   
$filename class=3D"keyword">=3D $cur_file pan class=3D"keyword">;

    $format ass=3D"keyword">=3D'' "keyword">;

    if(
preg_match pan class=3D"keyword">("/.jpg/i" an class=3D"keyword">, "$filename"<=
span class=3D"keyword">))

    {

        $format =
=3D 'image/=
jpeg'
;

    }

    if (
preg_match<=
span class=3D"keyword">("/.gif/i" pan class=3D"keyword">, "$filename"=
))

    {

       
$format =
=3D 'image/=
gif'
;

    }

    if(
preg_match pan class=3D"keyword">("/.png/i" an class=3D"keyword">, "$filename"<=
span class=3D"keyword">))

    {

        $format =
=3D 'image/=
png'
;

    }

    if(
$format class=3D"keyword">!=3D'' s=3D"keyword">)

    {

        list(
$wi=
dth
, $heig=
ht
) =3D ge=
timagesize
( >$filename);

       
$newheig=
ht
=3D$heig=
ht
*$newwid=
th
/$width<=
/span>;

        switch(
$=
format
)

        {

            case
"string">'image/jpeg':

           
ault">$source =3D efault">imagecreatefromjpeg( class=3D"default">$filename);

            break;

            case
"string">'image/gif';

           
ault">$source =3D efault">imagecreatefromgif( lass=3D"default">$filename);

            break;

            case
"string">'image/png':

           
ault">$source =3D efault">imagecreatefrompng( lass=3D"default">$filename);

            break;

        }

       
$thumb <=
/span>=3D imagecr=
eatetruecolor
( lt">$newwidth, lt">$newheight);

       
imagealp=
hablending
( >$thumb, f=
alse
);

       
$source =
=3D @image=
createfromjpeg
( ng">"$filename");

       
imagecop=
yresized
($=
thumb
, $so=
urce
, 0
pan>, 0 an class=3D"keyword">, 0 s=3D"keyword">, 0 yword">, $newwidth eyword">, $newheight "keyword">, $width eyword">, $height yword">);

       
$filenam=
e
=3D"$outpu=
t_dir/$filename"
;

        @
imagejp=
eg
($thumb<=
/span>, $filename=
);

    }

}

?>

call this function using

<?

resize("./input folder", "picture_file_name", "width", "./output folder"=
);

?>






del at kartoon dot net
05-May-2005 01:37


This snippet allows you to grab a thumbnail from the center of a large i=
mage.  This was used for a client photo gallery for art to give a t=
easer of the image to come (only a small portion).  You could get d=
ynamic with this value.  I also put in a scaling factor in case you=
want to scale down first before chopping.



<?php

// The file

$filename =
=3D
'moon.jpg' d">;

$percent =3D=
1.0; an>// if you want to scale down first

$imagethumbsize word">=3D 200 d">; // thumbnail size (area cropped in m=
iddle of image)

// Content type

header( pan>'Content-type: image/jpeg' "keyword">);



// Get new dimensions

list($widt=
h
, $height=
) =3D geti=
magesize
($=
filename
);

$new_width >=3D $width ">* $percent ">;

$new_height ">=3D $height rd">* $percent rd">;



// Resample

$image_p =3D=
imagecreatetruecolor "keyword">($imagethumbsize lass=3D"keyword">, $imagethumbsize=
);  // true =
color for best quality

$image =3D=
imagecreatefromjpeg "keyword">($filename "keyword">);



// basically take this line and put in yo=
ur versin the -($new_width/2) + ($imagethumbsize/2) & -($new_height/=
2) + ($imagethumbsize/2) for

// the 2/3 position in the 3 and 4 place for imagecopyresampled

// -($new_width/2) + ($imagethumbsize/2)

// AND

// -($new_height/2) + ($imagethumbsize/2)

// are the trick

imagecopyresampled eyword">($image_p yword">, $image ord">, -($new_width keyword">/2 >) + ($imagethumbsize "keyword">/2 ">), -($new_height eyword">/2=
) + (
$imagethumbsize "keyword">/2 ">), 0, span>0, pan class=3D"default">$new_width , >$new_width , pan>$width, n>$height);
=



// Output



imagejpeg(=
$image_p, =
null, an>100);

?>






development at lab-9 dot com
25-Apr-2005 03:35


If you read your Imagedata from a Database Blob and use the functions fr=
om above to resize the image to a thumbnail improving a lot of traffic, =
you will have to make temporary copies of the files in order that the fu=
nctions can access them



Here a example:



// switch through imagetypes

$extension =3D "jpg";

if(mysql_result($query, 0, 'type') =3D=3D "image/pjpeg")

{ $extension =3D "jpg"; } // overwrite

else if(mysql_result($query, 0, 'type') =3D=3D "image/gif")

{ $extension =3D "gif"; } // overwrite



// get a temporary filename

// use microtime() to get a unique filename

// if you request more than one file f.e. by creating large numbers of t=
humbnails, the server could be not fast enough to save all these differe=
nt files and you get duplicated copies and resizepics() will resize and =
output often the same content



$filename =3D microtime()."_temp.".$extension;



// open

$tempfile =3D fopen($filename, "w+");



// write

fwrite($tempfile, mysql_result($query, 0, 'image'));



// close

fclose($tempfile);



// resize and output the content

echo resizepics($filename, '100', '70');



// delete temporary file

unlink($filename);



NOTE: this script has to be put into a file which sends correct header i=
nformations to the browser, otherwise you won't get more to see than a b=
ig red cross :-)






robby at planetargon dot com
28-Feb-2005 07:56


Most of the examples below don't keep the proportions properly. They kee=
p using if/else for the height/width..and forgetting that you might have=
a max height AND a max width, not one or the other.



/**

* Resize an image and keep the proportions

* @author Allison Beckwith <allison@planetargon.com>

* @param string $filename

* @param integer $max_width

* @param integer $max_height

* @return image

*/

function resizeImage($filename, $max_width, $max_height)

{

    list($orig_width, $orig_height) =3D getimagesize($fil=
ename);



    $width =3D $orig_width;

    $height =3D $orig_height;



    # taller

    if ($height > $max_height) {

        $width =3D ($max_height / $height) * $w=
idth;

        $height =3D $max_height;

    }



    # wider

    if ($width > $max_width) {

        $height =3D ($max_width / $width) * $he=
ight;

        $width =3D $max_width;

    }



    $image_p =3D imagecreatetruecolor($width, $height); r />


    $image =3D imagecreatefromjpeg($filename);



    imagecopyresampled($image_p, $image, 0, 0, 0, 0,
/>
                   &nb=
sp;                 $width, $hei=
ght, $orig_width, $orig_height);



    return $image_p;

}






haker4o at haker4o dot org
26-Feb-2005 08:57


<?php

//          &nbs=
p;           Resize image.

//             Writeen By: Smelban &a=
mp; Haker4o

// Mails smelban@smwebdesigns.com & Haker4o@Haker4o.org

// This code is written to only execute on  jpg,gif,png   =
;  

// $picname =3D resizepics('pics', 'new widthmax', 'new heightmax');
/>
// Demo  $picname =3D resizepics('stihche.jpg', '180', '140');
>
$picname =3D=
resizepics >('picture-name.format' "keyword">, '180' word">, '140' ">);

echo
$pickname rd">;

//Error

die( "<f=
ont color=3D\"#FF0066\"><center><b>File not exists :(<=
b></center></FONT>"
);
>
//Funcion resizepics

function r=
esizepics
(=
$pics
, $ne=
wwidth
, $n=
ewheight
){

     if(
preg_match<=
span class=3D"keyword">(
"/.jpg/i" pan class=3D"keyword">, "$pics" n class=3D"keyword">)){

           =
header
('Con=
tent-type: image/jpeg'
);

     }

     if (
preg_match=
("/.gif/i"<=
span class=3D"keyword">, "$pics" an class=3D"keyword">)){

           =
header
('Con=
tent-type: image/gif'
);

     }

     list(
$width an class=3D"keyword">, $height n class=3D"keyword">) =3D getimagesize
pan>($pics=
);

     if(
$width n class=3D"keyword">> $height <=
span class=3D"keyword">&& $newhei=
ght
< $=
height
){

      
$newheight pan>=3D $height <=
/span>/ ($width <=
/span>/ $newwidth=
);

     } else if (
$width pan>< $height =
&& >$newwidth < ault">$width) {

      
$newwidth an>=3D $width pan>/ ($height span>/ $newheight=
);   

     } else {

      
$newwidth an>=3D $width an>;

      
$newheight pan>=3D $height span>;

    }

    if(
preg_match pan class=3D"keyword">(
"/.jpg/i" an class=3D"keyword">,
"$pics" class=3D"keyword">)){

   
$source lass=3D"keyword">=3D imagecreatefromjpeg<=
/span>($pics
n>);

    }

    if(
preg_match pan class=3D"keyword">("/.jpeg/i" pan class=3D"keyword">, "$pics" n class=3D"keyword">)){

    $source lass=3D"keyword">=3D imagecreatefromjpeg<=
/span>($pics
n>);

    }

    if(
preg_match pan class=3D"keyword">("/.jpeg/i" pan class=3D"keyword">, "$pics" n class=3D"keyword">)){

    $source lass=3D"keyword">=3D Imagecreatefromjpeg<=
/span>($pics
n>);

    }

    if(
preg_match pan class=3D"keyword">("/.png/i" an class=3D"keyword">, "$pics" class=3D"keyword">)){

    $source lass=3D"keyword">=3D imagecreatefrompng span>($pics
>);

    }

    if(
preg_match pan class=3D"keyword">("/.gif/i" an class=3D"keyword">, "$pics" class=3D"keyword">)){

    $source lass=3D"keyword">=3D imagecreatefromgif span>($pics
>);

    }

   
$thumb ass=3D"keyword">=3D imagecreatetruecolor<=
/span>($newwidth<=
/span>, $newheigh=
t
);

   
imagecopyresized >($thumb pan class=3D"keyword">, $source an class=3D"keyword">,
0 s=3D"keyword">, 0 yword">, 0=
,
0, n>$newwidth,
an>$newheight, span>$width,
an>$height);
>
    return
imagejpeg >($thumb pan class=3D"keyword">);

    if(
preg_match pan class=3D"keyword">("/.jpg/i" an class=3D"keyword">, "$pics" class=3D"keyword">)){

    return imagejpeg
>($thumb pan class=3D"keyword">);

    }

    if(preg_match pan class=3D"keyword">("/.jpeg/i" pan class=3D"keyword">, "$pics" n class=3D"keyword">)){

    return imagejpeg >($thumb pan class=3D"keyword">);

    }

    if(
preg_match pan class=3D"keyword">("/.jpeg/i" pan class=3D"keyword">, "$pics" n class=3D"keyword">)){

    return imagejpeg >($thumb pan class=3D"keyword">);

    }

    if(
preg_match pan class=3D"keyword">("/.png/i" an class=3D"keyword">, "$pics" class=3D"keyword">)){

    return imagepng=
($thumb an class=3D"keyword">);

    }

    if(preg_match pan class=3D"keyword">("/.gif/i" an class=3D"keyword">, "$pics" class=3D"keyword">)){

    return imagegif=
($thumb an class=3D"keyword">);

    }

 }

?>






smelban at smwebdesigns dot com
15-Feb-2005 08:37


Resize image proportionaly where you give a max width or max height
>


<?php

header
('Con=
tent-type: image/jpeg'
);

//$myimage =3D resizeImage('filename', 'n=
ewwidthmax', 'newheightmax');

$myimage =3D=
resizeImage ">('test.jpg' ">, '150', =
'120');
/>
print
$myimage rd">;



function
resizeImage "keyword">($filename "keyword">, $newwidth "keyword">, $newheight "keyword">){

    list(
$width n class=3D"keyword">,
$height class=3D"keyword">) =3D getimagesize an>($filename an>);

    if(
$width class=3D"keyword">>
$height pan class=3D"keyword">&&
$newheig=
ht
< $h=
eight
){

       
$newheig=
ht
=3D $he=
ight
/ ($w=
idth
/ $ne=
wwidth
);

    } else if (
$width an>< $height <=
/span>&& =
$newwidth
< ult">$width) {

       
$newwidt=
h
=3D $wid=
th
/ ($hei=
ght
/ $new=
height
);   

    } else {

       
$newwidt=
h
=3D $wid=
th
;

       
$newheig=
ht
=3D $he=
ight
;

    }

   
$thumb ass=3D"keyword">=3D imagecreatetruecolor<=
/span>($newwidth<=
/span>, $newheigh=
t
);

   
$source lass=3D"keyword">=3D imagecreatefromjpeg<=
/span>($filename<=
/span>);

   
imagecopyresized
>($thumb pan class=3D"keyword">, $source an class=3D"keyword">, 0 s=3D"keyword">, 0 yword">, 0=
,
0, n>$newwidth,
an>$newheight, span>$width, an>$height);
>
    return
imagejpeg >($thumb pan class=3D"keyword">);

}

?>






finnsi at centrum dot is
13-Feb-2005 05:30


If you need to delete or resize images in the filesystem (not in DB) wit=
hout loosing the image quality...

I commented the code as much as possible so that newbies (like myself) w=
ill understand it.  ;)



<?php

   

   
/*

   

    WRITTEN BY:

    Finnur Eiriksson, ( innsi" rel=3D"nofollow" target=3D"_blank">http://www.centrum.is/finnsi a>)

    Based on snippets that have been posted on www.PHP.ne=
t

    Drop me an e-mail if you have any questions.

   

    NOTE:

    This code is written to either delete or resize pictu=
res in the file system, so if you have your pictures in a database
=

    you will have to make some changes. Also, if you are =
using other picture formats than .gif's or .jpg's you

    will have to add som code as well (Read the comments =
to find out where to do this).

   

    IMPORTANT:    

    The $_GET['resizepic'] variable only contains the NAM=
E of the file that is going to be deleted/resized.

   

    The internet guest account (IUSR_SERVERNAME on WINDOW=
S) must have read and write permissions (execution permission not needed=
)

    in your image directory (i.e. $dir_name =3D "FooBar")=
. It is a good idea to have a separate directory for images that users <=
br />
    can upload to and manipulate the contents. Ideally, y=
ou should have one directory for the pictures that are used for the webs=
ite,

    and another upload directory

   

    */

    

   
$dir_name class=3D"keyword">=3D
"FooBar" n class=3D"keyword">;  // Enter the =
name of the directory that contains the images

   
$olddir lass=3D"keyword">=3D getcwd lass=3D"keyword">();  // Get the Cur=
rent Windows Directory to be able to switch back in the end of the scrip=
t

   
$dir s=3D"keyword">=3D opendir ss=3D"keyword">($dir_name ss=3D"keyword">); //make a directory hand=
le

    //To delete a picture

   
if(isset( class=3D"default">$_GET[ s=3D"string">'delpic'])){

       
chdir pan>('images'
n>);

       
$delpic =
=3D $_GET<=
/span>['delpic' pan>];

        @
unlink<=
/span>($delpic pan>);

       
chdir pan>($olddir n>);

    }

   
//To resize a picture<=
br />
   
if(isset( class=3D"default">$_GET[ s=3D"string">'resize'])){

       
//$_GET[=
'resize'] contains the resize-percentage (for example 80 and 40, for 80%=
and 40% respectively. To double the image in size the user enters 200 e=
tc.)

        // File and new size

       
$percent=
=3D ($_GE=
T
['resize'<=
/span>]/100 >);

       
chdir pan>('images' n>);// change the=
windows directory to the image directory

       
$filenam=
e
=3D $_GE=
T
['resizepi=
c'
];

               

       
// Decid=
e the content type, NB:This code is written to only execute on .gif's an=
d .jpg's

        // If you want other formats than .gif'=
s and .jpg's add your code here, in the same manner:

       
$format<=
/span>=3D''=
;

        if(
preg_=
match
("/.jp=
g/i"
, "$fil=
ename"
)){

           
ault">$format =3D tring">'image/jpeg';

           
ault">header( ">'Content-type: image/jpeg');

        }

        if (
preg=
_match
("/.g=
if/i"
, "$fi=
lename"
)){

           
ault">$format =3D tring">'image/gif';

           
ault">header( ">'Content-type: image/gif');

        }

        if(
$form=
at
!=3D'' pan>){  //Th=
is is where the actual resize process begins...

            // Get new sizes

           
word">list($width yword">, $height word">) =3D getimagesize s=3D"keyword">($filename s=3D"keyword">);

           
ault">$newwidth =3D "default">$width * default">$percent;

           
ault">$newheight =3D "default">$height * "default">$percent;

           

           
ment">// Load the image

           
word">switch($format "keyword">){

                case >'image/jpeg':
/>
                  &nbs=
p;
$source >=3D imagecreatefromjpeg s=3D"keyword">($filename s=3D"keyword">);

                break;
>
                case >'image/gif';
>
                  &nbs=
p;
$source >=3D imagecreatefromgif =3D"keyword">($filename =3D"keyword">);

                break;
>
            }

           
ment">//Get the Image

           
ault">$thumb =3D fault">imagecreatetruecolor( class=3D"default">$newwidth, class=3D"default">$newheight);

           
ment">//This must be set to false in order to be able to overwrite the b=
lack

            //pixels in the backgroun=
d with transparent pixels. Otherwise the new

            //pixels would just be ap=
plied on top of the black background.

           
ault">imagealphablending( ss=3D"default">$thumb, =3D"default">false);

           
ment">//Make a temporary file handle

           
ault">$source =3D @ default">imagecreatefromjpeg( class=3D"default">$filename
);

           
ment">// Resize

           
ault">imagecopyresized( =3D"default">$thumb, "default">$source, default">0, ">0, 0 an>, 0 n class=3D"keyword">, $newwidth an class=3D"keyword">,
$newheight<=
span class=3D"keyword">,
$width an class=3D"keyword">,
$height n class=3D"keyword">);

           
ment">//Write the image to the destination file

           
word">@imagejpeg word">($thumb d">, $filename rd">);

           
ment">//Change back to the old directory... I'm not sure that this is ne=
ccessary

           
ault">chdir( ">$olddir);

           
ment">//Specify where you want the user to go after the operation:
=

           
ault">header( ">'Location: foobar.php');

        }

    }

       

       

?>






thomas at dermueller dot com
10-Feb-2005 01:23


Just in addition to the script posted by marcy DOT xxx (AT) gmail.com: r />


There is one error in this script, that's why it didn't work for me.
/>


Instead of this line:

$source =3D @function_image_create($imgfile);



use this line:

$source =3D @$function_image_create($imgfile);






marcy DOT xxx (AT) gmail.com
02-Jan-2005 11:06


This example allow to use every kind of image and to resize images with =
ImageCopyResized(), maintaining proportions..



<?php

// switch to find the correct type of fun=
ction



$imgfile =3D=
'namefile.jpg' rd">;

Header( pan>"Content-type: image/" eyword">.$_GET rd">["type"=
]);



switch(
$_GET ">["type"])=
{

default:

   
$function_image_create=
=3D "Image=
CreateFromJpeg"
;

   
$function_image_new span>=3D "ImageJpe=
g"
;

break;

case
"jpg":=


   
$function_image_create=
=3D "Image=
CreateFromJpeg"
;

   
$function_image_new span>=3D "ImageJpe=
g"
;

case
"jpeg"=
:

   
$function_image_create=
=3D "Image=
CreateFromJpeg"
;

   
$function_image_new span>=3D "ImageJpe=
g"
;

break;

case
"png":=


   
$function_image_create=
=3D "Image=
CreateFromPng"
;

   
$function_image_new span>=3D "ImagePNG=
"
;

break;

case
"gif":=


   
$function_image_create=
=3D "Image=
CreateFromGif"
;

   
$function_image_new span>=3D "ImagePNG=
"
;

break;

}



list(
$width >, $height=
) =3D
getimagesize eyword">($imgfile yword">);



// the new weight of the thumb



$newheight >=3D 80; r />


// Proportion is maintained



$newwidth =
=3D (int) ((
$width eyword">*80 >)/$height=
);



$thumb =3D=
ImageCreateTrueColor "keyword">($newwidth "keyword">,$newheight "keyword">);

$source =3D=
@
function_image_create =3D"keyword">($imgfile "keyword">);



ImageCopyResized word">($thumb d">, $source ">, 0, pan>0, an class=3D"default">0, s=3D"default">0, fault">$newwidth, efault">$newheight, "default">$width, efault">$height);



@
$function_image_new "keyword">($thumb yword">);

?>






backglancer at hotmail
13-Dec-2004 07:10


Neat script to create a thumbnails no larger than 150 (or user-specific)=
height AND width.



<?PHP

$picture
=3D >"" # picture fileNAME here. not address<=
br />
$max=3D pan>150;  &n=
bsp;
# maximum size of 1 side of the pict=
ure.

/*

here you can insert any specific "if-else",

or "switch" type of detector of what type of picture this is.

in this example i'll use standard JPG

*/



$src_img=3D=
ImagecreateFromJpeg keyword">($picture eyword">);



$oh =3D span>imagesy( an>$src_img);&nbs=
p;
# original height

$ow =3D span>imagesx( an>$src_img);&nbs=
p;
# original width



$new_h =3D=
$oh;
>
$new_w =3D=
$ow;
>


if(
$oh >=
;
$max || =
$ow > <=
/span>$max){
>
       
$r n>=3D $oh<=
span class=3D"keyword">/
$ow lass=3D"keyword">;

       
$new_h <=
/span>=3D ($oh span>> $ow an>) ? $max n>: $max pan class=3D"keyword">*$r ss=3D"keyword">;

       
$new_w <=
/span>=3D $new_h<=
/span>/$r<=
span class=3D"keyword">;

}

// note TrueColor does 256 and not.. 8 />
$dst_img =3D=
ImageCreateTrueColor "keyword">($new_w yword">,$new_h rd">);



ImageCopyResized word">($dst_img ord">, $src_img ord">, 0,<=
/span>0, pan class=3D"default">0
, s=3D"default">0, fault">$new_w, ult">$new_h, t">ImageSX( >$src_img), ">ImageSY(=
$src_img
));



ImageJpeg(=
$dst_img, =
"th_$picture" ">);



?>






skurrilo at skurrilo dot de
28-Nov-2000 07:36


If you aren't happy with the quality of the resized images, just give Im=
ageMagick a try. ( " target=3D"_blank">http://www.imagemagick.org) This is a commandlin=
e tool for converting and viewing images.









 









This mirror generously provided by:
Yahoo! Inc.

Last updated: Wed Jun 27 16:01:19 2012 UTC





------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: text/css; charset=utf-8
Content-Location: http://static.php.net/www.php.net/styles/site.css
Content-Transfer-Encoding: 8bit

/* General page styles ---------------------------------------------------- */
body, html {
margin: 0px;
padding: 0px;
color: black;
background-color: white;
}

body, input, textarea, select, option {
font-family: verdana, arial, helvetica, sans-serif;
}
code, pre, tt {
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", Monaco, "Courier New", Courier, monospace;
}
tt.parameter, code.parameter {
font-style: italic;
}
pre {
background-color: #ddd;
}

#content, #headmenu, #footnav, #copyright, #thismirror,
#headsearch span, #headsearch input, #headsearch select {
font-size: 85%;
}

a, a:visited, a:hover {
color: #000099;
background-color: transparent;
}

a:active {
color: #0000ff;
background-color: transparent;
}

h1, h2, h3, h4 {
font-weight: bold;
color: #000066;
background-color: transparent;
}
h1 { font-size: 130%; }
h2 { font-size: 125%; }
h3 { font-size: 110%; }
h4 { font-size: 100%; }

/* browsers handle this differently
input.max, textarea.max, select.max {
width: 100%;
}
*/

img {
border: 0px;
}
img.middle {
vertical-align: middle;
}

/* {{{ The "latest releases" box on the top right */
#releaseBox, #candidateBox {
border : 1px dotted #999;
margin : 0 0 5px 0;
padding: 2px;
}
#releaseBox h4, #candidateBox h4 {
border: 1px solid #000;
border-width: 0px 1px 1px 0px;
background-color: #d3d3d3;
margin : 0;
padding: 2px;
}
#releaseBox h4 {
/* color: #080; */
}
#candidateBox h4 {
/* color: #C70; */
}
ol#releases, ol#candidates {
margin : 0;
padding: 0 1px 0 2px;
background-color: white;
border-bottom: 1px solid white;
}
ol#releases li, ol#candidates li{
list-style-type: none;
font-size: .9em;
}
ol#releases li span.release {
font-weight: bold;
}
/* }}} */

/* {{{ Errors, warning, tips classes */
p.formerror, p.warn {
border: 1px solid #666600;
color: #660000;
background-color: #ffeeee;
margin: 4px;
padding: 6px;
}

/* Manual warnings/cautions/tips */
div.warning , div.caution, div.tip, div.information {
margin: 20px;
padding: 20px 30px;
text-align: center;
}
div.warning, div.tip {
background-repeat: no-repeat;
padding-left: 92px;
background-position: center left;
}
div.warning p, div.caution p, div.tip p, div.information p {
text-align: justify;
}
div.tip {
border: 1px solid #00c;
color: #006;
background-color: #eef;
}
div.warning {
border: 1px solid #660;
color: #600;
background-color: #fee;
}
div.information {
border: 1px solid #00c;
color: #006;
background-color: #eef;
}
div.caution {
border: 1px solid #333;
color: #333;
background-color: #ffc;
}
#leftbar div.tip, #leftbar div.information {
margin: 0;
padding: 5px;
text-align: left;
}
#leftbar div.tip p, #leftbar div.information p {
text-align: left;
}

/* FIXME: Remove when the new XSL build has finished */
div.warning table, div.warning table tr, div.warning table td,
div.caution table, div.caution table tr, div.caution table td {
border: 0;
}
/* }}} */

hr {
border: 0px;
color: black;
background-color: black;
height: 1px;
/* clear: both; has problems in IE and Opera */
}

.center {
text-align: center;
}
.center table {
margin-left: auto;
margin-right: auto;
text-align: left;
}
.center th {
text-align: center;
}

.newsdate {
font-size: smaller;
font-style: italic;
color: #6666cc;
background-color: transparent;
}
div.newsItem .newsdate {
float:left;
margin-right: 10px;
}

div.indent {
margin-left: 50px;
}

li {
padding-top: 3px;
padding-bottom: 3px;
}
/* Don't overwrite ordered lists */
ul li {
list-style-type: square;
}

em {
font-weight: bold;
font-style: italic;
}

ul.simple {
padding-left: 8px;
margin: 0 0 1em 0;
}
ul.simple li {
padding: 0px;
list-style-type: none;
}

.md5sum {
color: #6666cc;
background-color: transparent;
}

/* Used for manual page toc wrapping */
.w {
font-size: 0;
}

/* Content are styles ----------------------------------------------------- */
#content {
padding: 10px;
}
#content h1 {
margin-top: 0px;
}

/* 3px IE bug hack hidden from IE5-mac \*/
* html #content { height: 1%; }
/* End hide from IE5-mac */

/* Layout styling and helpers --------------------------------------------- */
#layout_2, #layout_3 {
/* Background image will be set in a mirror specific CSS rule */
background-position: top left;
background-repeat: repeat-y;
}
#layout_3_helper {
/* Background image will be set in a mirror specific CSS rule */
background-position: top right;
background-repeat: repeat-y;
}

.cleaner {
clear: both;
height: 1px;
font-size: 1px;
}

#leftbar {
float: left;
width: 186px;
padding: 5px;
font-size: smaller;
}
#conferencesSidebar {
float: left;
width: 300px;
border-right: 1px dotted #000;
padding: 0 0 0 5px;
background-color: #efefef;
font-size: smaller;
}

/* {{{ Latest conference announcements on the frontpage */
#confTeaser {
border: 1px dotted #999;
padding: 10px 0;
margin: 0;
background-color: #eee;
font-size: small;
}

#confTeaser p {
display: inline;
}

#confTeaser ul {
margin: 0;
padding: 0;
display: inline;
}

#confTeaser ul li {
background-color: #eee;
padding: 0 2px;
margin: 0;
display: inline;
}
/* }}} */

#leftbar p, #leftbar h3, #rightbar p, #rightbar h3 {
margin-top: 0;
margin-bottom: 1em;
}
#rightbar {
float: right;
width: 186px;
padding: 5px;
font-size: smaller;
}

#rightbar h3 {
font-size: small;
}

#layout_1 #content.conferences {
margin-left: 310px;
}
#layout_2 #content, #layout_3 #content {
margin-left: 196px;
}
#layout_3 #content {
margin-right: 196px;
}

/* Header navigation area ------------------------------------------------- */
#headnav {
color: inherit;
background-color: #9999cc;
height: 67px;
position: relative;
}
#headnav img {
border: 0px;
margin: 0px 3px;
}
#headmenu {
position: absolute;
bottom: 0px;
right: 5px;
text-align: right;
padding-left: 126px;
}
#headsearch {
background-color: #666699;
border-width: 1px 0px;
border-color: #333366;
border-style: solid;
text-align: right;
padding-right: 6px;
font-size: 75%;
color: white;
}
#headsearch input.submit {
vertical-align: baseline;
}
#headsearch form, #headsearch p {
margin: 0px;
}
#headsearch span.shortkey {
text-decoration: underline;
font-size: 100%;
}

/* Footer navigation area ------------------------------------------------- */
#footnav {
color: inherit;
background-color: #9999cc;
border-width: 1px 0px;
border-color: #333366;
border-style: solid;
text-align: right;
padding-right: 6px;
}
#pagefooter {
position: relative;
font-size: 75%;
color: inherit;
background-color: #cccccc;
width: 100%;
}
#thismirror {
text-align: right;
margin-left: 50%;
padding: 6px;
}
#copyright {
position: absolute;
top: 0px;
left: 0px;
padding: 6px;
margin-right: 30%;
}
#footnav a, #headmenu a {
font-size: 75%;
text-decoration: none;
}

/* Credits page styles ---------------------------------------------------- */
.e {
background-color: #ccccff;
color: inherit;
font-weight: bold;
}
.h {
background-color: #9999cc;
color: inherit;
font-weight: bold;
}
.v, .vr {
background-color: #cccccc;
color: inherit;
}
.vr {
text-align: right;
}

/* PHP source code highlighting ------------------------------------------- */
.phpcode, div.classsynopsis {
padding: 0.5em;
text-align: left;
}
div.phpcode span.html {
color: black;
background-color: transparent;
}
div.phpcode span.comment, div.classsynopsisinfo_comment {
color: #FF8000;
background-color: transparent;
}
div.classsynopsisinfo_comment {
font-weight: bold;
}
div.phpcode span.default {
color: #0000BB;
background-color: transparent;
}
div.phpcode span.keyword {
color: #007700;
background-color: transparent;
}
div.phpcode span.string {
color: #DD0000;
background-color: transparent;
}

/* XML source code highlighting ------------------------------------------- */
div.xmlcode span.attributes {
color: #333366;
background-color: transparent;
}
div.xmlcode span.cdata {
color: #990000;
background-color: transparent;
}
div.xmlcode span.comment {
color: #666666;
background-color: transparent;
}
div.xmlcode span.tags {
color: #000066;
background-color: transparent;
}
div.xmlcode span.keyword {
color: #cc6600;
background-color: transparent;
}
div.xmlcode span.string {
color: #006600;
background-color: transparent;
}

.refentry table td {
text-indent: 5px;
}

/* Standard tables -------------------------------------------------------- */
table.standard td {
background-color: #eeeeee;
color: inherit;
}
table.standard th {
background-color: #cccccc;
color: inherit;
}
table.standard td.highlight {
background-color: #ffffcc;
color: inherit;
}
table.standard td.sub, table.standard th.sub,
table.standard th.subr, table.standard th.subl {
background-color: #dddddd;
color: inherit;
}
table.standard th.subr {
text-align: right;
vertical-align: top;
}
table.standard th.subl {
text-align: left;
vertical-align: top;
}

/* Mirror listing tables -------------------------------------------------- */
table.mirrors td {
background-color: #eeeeee;
color: inherit;
font-size: smaller;
}
table.mirrors th {
background-color: #cccccc;
color: inherit;
}
table.mirrors th.ch {
text-align: left;
}
table.mirrors th img {
border: 1px solid #000000;
}
table.mirrors th.flag {
width: 45px;
}
table.mirrors tr.this td {
background-color: #ffffcc;
color: inherit;
}
table.mirrors td.caret {
text-align: right;
background-color: white !important;
color: inherit;
}

/* Calendar table --------------------------------------------------------- */
table#cal {
font-size: smaller;
background-color: #a0a0a0;
color: inherit;
}
table#cal td {
background-color: #f0f0f0;
color: inherit;
vertical-align: top;
}
table#cal a {
text-decoration: none;
}
table#cal a:hover {
text-decoration: underline;
}
table#cal a.day {
float: right;
font-weight: bold;
color: #666666;
background-color: transparent;
}
table#cal div.event {
margin-bottom: 2px;
padding-bottom: 2px;
border-bottom: 1px dashed #000000;
}
table#calnav td, table#cal td.notaday {
background-color: #d0d0d0;
color: inherit;
}
table#cal a.cat1 {
color: green;
background-color: transparent;
}
table#cal a.cat3 {
color: black;
background-color: transparent;
}

/* Logos table ------------------------------------------------------------ */
table#logos {
background-color: #f0f0f0;
color: inherit;
}
table#logos td {
vertical-align: middle;
}
table#logos td.logo, table#logos td.logob {
text-align: center;
width: 33%;
background-color: #ffffff;
color: inherit;
}
table#logos td.logob {
background-color: #000000;
color: inherit;
}
table#logos td.star {
width: 20px;
}
span.star {
font-size: 1.5em;
font-weight: bold;
color: #6868cd;
}
table#logos td ul {
padding-left: 15px;
list-style-type: square;
}

/* PHP Manual table ------------------------------------------------------- */
table.doctable, table.informaltable {
border: 0px;
}
table.doctable td, table.doctable th, table.doctable caption,
table.informaltable td, table.informaltable th, table.informaltable caption {
padding: 5px;
}
table.doctable thead th, table.informaltable thead th {
background-color: #9999CC;
}
table.doctable tbody td, table.informaltable tbody td {
background-color: #F0F0F0;
}

/* User notes on manual pages --------------------------------------------- */
div#usernotes {
background-color: #e0e0e0;
color: inherit;
}
div#usernotes div.head, div#usernotes div.foot {
background-color: #d0d0d0;
color: inherit;
padding: 4px;
}
div#usernotes div.foot {
text-align: right;
}
div#usernotes div.foot a, div#usernotes div.head a {
color: black;
background-color: transparent;
}
div#usernotes span.action {
float: right;
}
div#usernotes div.note {
padding: 4px;
}
div#usernotes div.text {
background-color: #f0f0f0;
color: inherit;
padding: 2px;
margin-top: 4px;
}

/* Left sidebar TOC on manual pages --------------------------------------- */
ul.toc {
margin: 0px 5px 5px 5px;
padding: 0px;
}
ul.toc li {
font-size: 85%;
margin: 1px 0 1px 1px;
padding: 1px 0 1px 11px;
list-style-type: none;
background-repeat: no-repeat;
background-position: center left;
}
ul.toc li.header {
font-size: 115%;
padding: 5px 0px 5px 11px;
border-bottom: 1px solid #cccccc;
margin-bottom: 5px;
}
ul.toc li.active {
font-weight: bold;
}
ul.toc li a {
text-decoration: none;
}
ul.toc li a:hover {
text-decoration: underline;
}

/* Top and bottom navigation controls on manual pages --------------------- */
div.manualnavbar {
background-color: #e0e0e0;
color: inherit;
padding: 4px;
margin-bottom: 10px;
}
div.manualnavbar a {
text-decoration: none;
}
div.manualnavbar a:hover {
text-decoration: underline;
}
div.manualnavbar .prev, div.manualnavbar .langchooser {
padding-right: 4px;
}
div.manualnavbar .next, div.manualnavbar .lastupdated {
float: right;
padding-left: 4px;
}
div.manualnavbar hr {
color: #cccccc;
background-color: #cccccc;
}
div.manualnavbar form {
margin: 0px;
font-size: 75%;
}
div.manualnavbar .lastupdated {
font-size: 75%;
}
div.manualnavbar div.langchooser #changeLangImage {
border: 0px solid #000;
width: 11px;
height: 11px;
}
div.manualnavbar fieldset {
margin: 0px;
padding: 0px;
border: 0px solid #000;
}
div.manualnavbar div.langchooser p {
margin: 0px 10px 0 5px;
padding: 0px;
float: left;
}

/* for searching system... */
ul#search-results {
list-style-type: none;
}
ul#search-results li {
margin-top: 0.5em;
list-style-type: none;
}
ul#search-results p {
margin: 0;
}
ul#search-results p.result {
font-weight: 700;
}
ul#search-results p.summary,
ul#search-results p.meta {
font-size: 0.8em;
margin-left: 1em;
}
ul#search-results p.meta {
color: #008000;
}
ul#search-results p.meta a {
color: #8284cc;
}
div#results_nav {
margin: auto;
width: 200px;
text-align: center;
}

ul#results_nav_list {
margin-top: -1em;
text-align: center;
padding: 0px;
}
ul#results_nav_list li {
display: inline;
margin-right: 0.4em;
list-style-type: none;
}

ul#quickref_functions {
display: inline;
margin-right: 0.4em;
}

ul#quickref_functions li {
list-style-type: none;
margin:0;
padding:0;
float:left;
width:30%;
}

ul#quickref_other {
display: inline;
margin-right: 0.4em;
}

ul#quickref_other li {
list-style-type: none;
margin:0;
padding:0;
float:left;
width:30%;
}

/* Definition lists used on eg. the unsub page */
dl dd {
margin: 0.5em 0 0.5em 2em;
padding: 0.5em;
}

/* Event month header on homepage */
h4.eventmonth {
border-style: solid;
border-color: black;
border-width: 0px 1px 1px 0px;
background-color: #d3d3d3;
padding: 2px;
}
#conferencesSidebar h4.eventmonth {
border-width: 0px 0px 1px 0px;
}


/* {{{ Security Respons section */
#content.security {
width: 610px;
}
#content.security .record {
width: 550px;
border-style: solid;
border-color: black;
border-width: 1px 0px;
padding: 5px;
}
#content.security .record .id,
#content.security .record .date,
#content.security .record .range {
float: left;
}
#content.security .record .date {
text-indent: 5px;
width: 105px;
}
#content.security .record .id {
width: 90px;
}
#content.security .record .range {
width: 55px;
}
#content.security .record .affects {
font-weight: bold;
}
#content.security .record .summary {
text-indent: 10px;
padding: 3px 0px;
}
#content.security .low {
background-color: yellow;
}
#content.security .medium {
background-color: #f90;
}
#content.security .critical {
background-color: #FF0000;
}
#content ul.colors {
width: 150px;
}
#content ul.colors li {
text-indent: 10px;
}

/* Single records */
#content.security .singlerecord {
text-align: left;
font-size: 1.1em;
width: 650px;
}
#content.security .singlerecord .title {
float: left;
font-weight: bold;
width: 150px;
text-indent: 10px;
}
#content.security .singlerecord .reporter,
#content.security .singlerecord .references {
margin: 0 0 10px 0;
}
#content.security .description .title {
border-style: solid;
border-color: black;
border-width: 0px 0px 0px 0px;
}
#content.security .description .data {
float: left;
text-indent: 20px;
padding: 5px;
width: 650px;
}
/* }}} */

/* {{{ phpdoc examples */
div.example, div.informalexample {
background-color: #fff;
border: 1px solid #000;
text-align: left;
color: #000;
}

div.refsect1 div.example {
margin-top: 20px;
}

div.example p {
margin: 0px;
padding: 0.2em;
text-indent: 1em;
border-bottom: 1px dotted #000;
}

div.example div.example-contents,
table .phpcode,
div.classsynopsis,
div.informalexample pre,
div.informalexample .phpcode {
background-color: #e1e1e1;
margin: 10px;
border: 1px outset #000;
}
div.mediaobject {
margin: 10px;
}
div.example-contents pre {
background-color: #e1e1e1;
}

/* Konq & Fx, for what ever reason, dislike br:before so this doesn't work at the moment...
* This should however add line-number to examples - which will _not_ be copied to clipboard
* when the code is copy/pasted
div.example div.example-contents:after {
counter-reset: phpexample;
}

div.example-contents br:before {
content: counter(phpexample);
counter-increment: phpexample;
}
*/

div.example div.example-contents p, div.informalexample p {
background-color: #ccc;
text-indent: 0;
border-bottom: 1px outset #000;
}

div.example div.screenshot img {
padding: 20px;
border: 1px dotted #000;
background-color: #E0E0E0;
}
/* }}} */

/* Make sure the underscore in many function names are visible */
div.refentry a, div.reference a, div.section a {
text-decoration: none;
border-bottom: 1px solid #009;
}

div.refsect1 {
border: solid 2px #cccccc;
border-collapse: collapse;
margin: 1em;
padding: 1em;
background-color: #eeeeff;
}
div.refsect1 h3 {
margin-top: 0;
padding-top: 0;
border-bottom: dashed 1px #ffffff;
}
div.refsect1 dl {
padding: 15px;
border: 1px solid #ddd;
}
div.refsect1 dd {
border: groove 2px #ffffff;
background-color: #f5f5ff;
}
div.refsect1 span.term {
font-size: 1.2em;
border-bottom: groove 1px #dddddd;
}
div.section dt {
background: #FAFAFA;
border-bottom: 1px solid #CCC;
}

div.refsect1 span.term b tt, div.refsect1 span.term strong code {
font-size: 0.9em;
}

div.refsect1 .title .toggler {
border-bottom: none;
}

div.classsynopsisinfo_comment {
text-indent: 30px;
padding-top: 2em;
}
div.classsynopsis div.methodsynopsis,
div.classsynopsis div.constructorsynopsis,
div.classsynopsis div.destructorsynopsis,
div.classsynopsis div.fieldsynopsis {
text-indent: 30px;
padding: 3px;
}
div.refsect1 div.methodsynopsis,
div.refsect1 div.constructorsynopsis,
div.refsect1 div.destructorsynopsis {
background-color: #fff;
padding: 0.5em;
border: 1px solid black;
}
div.classsynopsis {
color: rgb(0, 119, 0);
}
div.classsynopsis b.classname,
div.classsynopsis strong.classname,
div.classsynopsis span.interfacename,
div.classsynopsis div.fieldsynopsis var,
div.classsynopsis div.classsynopsisinfo var,
div.classsynopsis span.methodname,
div.classsynopsis tt.parameter,
div.classsynopsis code.parameter,
div.classsynopsis span.modifier_role {
color: rgb(0, 0, 187);
}
div.classsynopsis b.interfacename, div.classsynopsis strong.interfacename {
color: #0000BB;
font-weight: normal;
}
span.replaceable, span.initializer {
font-style: italic;
}
div.authorgroup {
padding: 10px;
}
blockquote {
border: 1px solid #000;
background-color: #FFF;
margin: 0.5em 0;
padding: 0.5em 1em;
}

div.footnote sup {
float: left;
}
div.footnote p {
text-indent: 10px;
}
div.reportbug {
font-size: 80%;
float: right;
}

/* Soft-deprecation Notices */
div.soft-deprecation-notice {
margin: 1em;
padding: 1em;
position: relative;
border: 2px solid #AA6666;
color: #660000;
background-color: #ffeeee;
}
div.soft-deprecation-notice h1.title {
font-size: 110%;
border-bottom: dashed 1px white;
}
div.soft-deprecation-notice .title .toggler {
border-bottom: none;
}
div.soft-deprecation-notice blockquote.sidebar {
margin: 0;
padding: 0;
border: none;
background: transparent;
}

/*
* vim: noet
*/


------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: text/css; charset=utf-8
Content-Location: http://static.php.net/www.php.net/styles/phpnet.css
Content-Transfer-Encoding: 8bit

/* TOC elements on manual pages ------------------------------------------- */
ul.toc li {
background-image: url(http://static.php.net/www.php.net/images/box-0.gif);
}
ul.toc li.up {
background-image: url(http://static.php.net/www.php.net/images/caret-u.gif);
}
ul.toc li.home {
background-image: url(http://static.php.net/www.php.net/images/caret-t.gif);
}
ul.toc li.active {
background-image: url(http://static.php.net/www.php.net/images/box-1.gif);
}

/* Sidebar backgrounds ---------------------------------------------------- */
#layout_2, #layout_3 {
background-image: url(http://static.php.net/www.php.net/images/leftbar.png);
}
#layout_3_helper {
background-image: url(http://static.php.net/www.php.net/images/rightbar.png);
}

/* Tips and warning icons, mainly used in the manual */
div.tip {
background-image: url(http://static.php.net/www.php.net/images/dialog-information.png);
}
div.warning {
background-image: url(http://static.php.net/www.php.net/images/dialog-warning.png);
}

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: image/gif
Content-Location: http://static.php.net/www.php.net/images/box-0.gif
Content-Transfer-Encoding: Base64

R0lGODlhCwAHAID/AMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAINhI8WmhrfopQL
1PRgKgA7

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: image/gif
Content-Location: http://static.php.net/www.php.net/images/caret-u.gif
Content-Transfer-Encoding: Base64

R0lGODlhCwAHAIAAAMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAINhI8XoZzrkpzx
sTVnAQA7

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: image/gif
Content-Location: http://static.php.net/www.php.net/images/caret-t.gif
Content-Transfer-Encoding: Base64

R0lGODlhCwAHAIAAAMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAIRhB2nGLnQoDuR
vTZp2ll6UwAAOw==

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: image/gif
Content-Location: http://static.php.net/www.php.net/images/box-1.gif
Content-Transfer-Encoding: Base64

R0lGODlhCwAHAID/AMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAIMhI8WG6nsopSs
ueoKADs=

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: image/png
Content-Location: http://static.php.net/www.php.net/images/leftbar.png
Content-Transfer-Encoding: Base64

iVBORw0KGgoAAAANSUhEUgAAAMUAAAAUCAIAAACyOG4tAAAABmJLR0QA/wD/AP+g
vaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAAB3RJTUUH0wgXDDAD6pV+6wAAAFxJ
REFUeJzt1lEJwEAMBcFe/RuJu0ioiYWDMqMgH0t4Z3cfiLy3D+BX9ERmZvRESU+U
jj1OyH+ipCcy9jgxPVGyxyn5T5T0RMYeJ6YnSvY4Jf+Jkp7I2OPE9ETpA9dCE1Ej
B3J/AAAAAElFTkSuQmCC

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline
Content-Type: text/css; charset=utf-8
Content-Location: http://static.php.net/www.php.net/styles/print.css
Content-Transfer-Encoding: 8bit

#headmenu, #headsearch, #leftbar, #rightbar, #footnav, #thismirror,
.manualnavbar .next, .manualnavbar .prev, .manualnavbar .langchooser,
.manualnavbar hr, .manualnavbar_bottom, #usernotes .action, #usernotes .foot {
display: none;
}

#layout_2 #content, #layout_3 #content {
width: 100%;
margin: 0;
}

#headnav, #layout_2, #layout_3, #layout_3_helper, div.manualnavbar {
background: none;
}

#headnav {
float: right;
}

#usernotes .note, #usernotes {
border-top: 1px solid black;
}

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline; filename=userprefs.js
Content-Type: text/javascript; charset=utf-8; name=userprefs.js
Content-Location: http://static.php.net/www.php.net/userprefs.js
Content-Transfer-Encoding: 8bit

// Get a value of one cookie set by it's name
// Impmentation from the JS 1.3 Client Guide by Netscape
function getCookie(Name)
{
var search = Name + "=";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) { end = document.cookie.length; }
return unescape(document.cookie.substring(offset, end));
}
}
return null;
}

// Make events in the user's country bold
function boldEvents()
{
// Get cookie if possible
country = getCookie("COUNTRY");
if (typeof(country) == "string") {

// Get country code from cookie
country = country.substring(0, 3);

// If DOM is supported, get s
if (document.getElementsByTagName) {

spans = document.getElementsByTagName("span");

// Style every span bold which is for this country
for (var i = 0; i < spans.length; i++) {
if (spans[i].className == "event_" + country + " vevent") {
spans[i].style.fontWeight = "bold";
}
}
}
}
}

// Load function name suggestion code (for search box)
function loadSuggestCode()
{
searchEnabled = true;
// Force default turnoff for buggy Mac browsers
if (navigator.userAgent.toLowerCase().indexOf('mac') > 0) {
searchEnabled = false;
}

myphpnet = getCookie('MYPHPNET');
if (typeof(myphpnet) == "string") {
myphpnet_parts = myphpnet.split(",");
if (myphpnet_parts.length > 3) {
if (myphpnet_parts[3] == '1') {
searchEnabled = false;
}
// Enable if user explicity wanted to enable it
// Important for Mac users, who get disabled by default
else if (myphpnet_parts[3] == '0') {
searchEnabled = true;
}
}
}
if (searchEnabled && document.getElementsByTagName && document.createElement) {
var elems = document.getElementsByTagName("*");
for (var i = 0; i < elems.length; i++) {
if (elems[i].tagName.toLowerCase() == 'head') {
var scriptElem = document.createElement('script');
scriptElem.setAttribute('type', 'text/javascript');
scriptElem.setAttribute('src', '/functions.js');
elems[i].appendChild(scriptElem);
break;
}
}
}
}

------------6nhAxGuvOMzG6waYgcmWNI
Content-Disposition: inline; filename=jquery.min.js
Content-Type: text/javascript; charset=UTF-8; name=jquery.min.js
Content-Location: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
Content-Transfer-Encoding: Quoted-Printable

/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){var l=3Dthis,g,y=3Dl.jQuery,p=3Dl.$,o=3Dl.jQuery=3Dl.$=3Dfun=
ction(E,F){return new o.fn.init(E,F)},D=3D/^[^<]*(<(.|\s)+>)[^>]*$|^#([\=
w-]+)$/,f=3D/^.[^:#\[\.,]*$/;o.fn=3Do.prototype=3D{init:function(E,H){E=3D=
E||document;if(E.nodeType){this[0]=3DE;this.length=3D1;this.context=3DE;=
return this}if(typeof E=3D=3D=3D"string"){var G=3DD.exec(E);if(G&&(G[1]|=
|!H)){if(G[1]){E=3Do.clean([G[1]],H)}else{var I=3Ddocument.getElementByI=
d(G[3]);if(I&&I.id!=3DG[3]){return o().find(E)}var F=3Do(I||[]);F.contex=
t=3Ddocument;F.selector=3DE;return F}}else{return o(H).find(E)}}else{if(=
o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){=
this.selector=3DE.selector;this.context=3DE.context}return this.setArray=
(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:functio=
n(){return this.length},get:function(E){return E=3D=3D=3Dg?Array.prototy=
pe.slice.call(this):this[E]},pushStack:function(F,H,E){var G=3Do(F);G.pr=
evObject=3Dthis;G.context=3Dthis.context;if(H=3D=3D=3D"find"){G.selector=
=3Dthis.selector+(this.selector?" ":"")+E}else{if(H){G.selector=3Dthis.s=
elector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=3D0;=
Array.prototype.push.apply(this,E);return this},each:function(F,E){retur=
n o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:=
E,this)},attr:function(F,H,G){var E=3DF;if(typeof F=3D=3D=3D"string"){if=
(H=3D=3D=3Dg){return this[0]&&o[G||"attr"](this[0],F)}else{E=3D{};E[F]=3D=
H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o=
.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=3D=3D"width"||E=3D=3D=
"height")&&parseFloat(F)<0){F=3Dg}return this.attr(E,F,"curCSS")},text:f=
unction(F){if(typeof F!=3D=3D"object"&&F!=3Dnull){return this.empty().ap=
pend((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E=
=3D"";o.each(F||this,function(){o.each(this.childNodes,function(){if(thi=
s.nodeType!=3D8){E+=3Dthis.nodeType!=3D1?this.nodeValue:o.fn.text([this]=
)}})});return E},wrapAll:function(E){if(this[0]){var F=3Do(E,this[0].own=
erDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map=
(function(){var G=3Dthis;while(G.firstChild){G=3DG.firstChild}return G})=
.append(this)}return this},wrapInner:function(E){return this.each(functi=
on(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(=
function(){o(this).wrapAll(E)})},append:function(){return this.domManip(=
arguments,true,function(E){if(this.nodeType=3D=3D1){this.appendChild(E)}=
})},prepend:function(){return this.domManip(arguments,true,function(E){i=
f(this.nodeType=3D=3D1){this.insertBefore(E,this.firstChild)}})},before:=
function(){return this.domManip(arguments,false,function(E){this.parentN=
ode.insertBefore(E,this)})},after:function(){return this.domManip(argume=
nts,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})=
},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sor=
t,splice:[].splice,find:function(E){if(this.length=3D=3D=3D1){var F=3Dth=
is.pushStack([],"find",E);F.length=3D0;o.find(E,this[0],F);return F}else=
{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G=
)})),"find",E)}},clone:function(G){var E=3Dthis.map(function(){if(!o.sup=
port.noCloneEvent&&!o.isXMLDoc(this)){var I=3Dthis.outerHTML;if(!I){var =
J=3Dthis.ownerDocument.createElement("div");J.appendChild(this.cloneNode=
(true));I=3DJ.innerHTML}return o.clean([I.replace(/ jQuery\d+=3D"(?:\d+|=
null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}})=
;if(G=3D=3D=3Dtrue){var H=3Dthis.find("*").andSelf(),F=3D0;E.find("*").a=
ndSelf().each(function(){if(this.nodeName!=3D=3DH[F].nodeName){return}va=
r I=3Do.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.a=
dd(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){retu=
rn this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.ca=
ll(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType=3D=3D=
=3D1})),"filter",E)},closest:function(E){var G=3Do.expr.match.POS.test(E=
)?o(E):null,F=3D0;return this.map(function(){var H=3Dthis;while(H&&H.own=
erDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return =
H}H=3DH.parentNode;F++}})},not:function(E){if(typeof E=3D=3D=3D"string")=
{if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)=
}else{E=3Do.multiFilter(E,this)}}var F=3DE.length&&E[E.length-1]!=3D=3Dg=
&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0=
:this!=3DE})},add:function(E){return this.pushStack(o.unique(o.merge(thi=
s.get(),typeof E=3D=3D=3D"string"?o(E):o.makeArray(E))))},is:function(E)=
{return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return=
!!E&&this.is("."+E)},val:function(K){if(K=3D=3D=3Dg){var E=3Dthis[0];if=
(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?=
E.value:E.text}if(o.nodeName(E,"select")){var I=3DE.selectedIndex,L=3D[]=
,M=3DE.options,H=3DE.type=3D=3D"select-one";if(I<0){return null}for(var =
F=3DH?I:0,J=3DH?I+1:M.length;F G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(=
/\r/g,"")}return g}if(typeof K=3D=3D=3D"number"){K+=3D""}return this.eac=
h(function(){if(this.nodeType!=3D1){return}if(o.isArray(K)&&/radio|check=
box/.test(this.type)){this.checked=3D(o.inArray(this.value,K)>=3D0||o.in=
Array(this.name,K)>=3D0)}else{if(o.nodeName(this,"select")){var N=3Do.ma=
keArray(K);o("option",this).each(function(){this.selected=3D(o.inArray(t=
his.value,N)>=3D0||o.inArray(this.text,N)>=3D0)});if(!N.length){this.sel=
ectedIndex=3D-1}}else{this.value=3DK}}})},html:function(E){return E=3D=3D=
=3Dg?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=3D"(?:\d+|null)"/g,"=
"):null):this.empty().append(E)},replaceWith:function(E){return this.aft=
er(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function=
(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"sl=
ice",Array.prototype.slice.call(arguments).join(","))},map:function(E){r=
eturn this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},a=
ndSelf:function(){return this.add(this.prevObject)},domManip:function(J,=
M,L){if(this[0]){var I=3D(this[0].ownerDocument||this[0]).createDocument=
Fragment(),F=3Do.clean(J,(this[0].ownerDocument||this[0]),I),H=3DI.first=
Child;if(H){for(var G=3D0,E=3Dthis.length;G his.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;f=
unction K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.ge=
tElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElem=
ent("tbody"))):N}}};o.fn.init.prototype=3Do.fn;function z(E,F){if(F.src)=
{o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.t=
ext||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.remov=
eChild(F)}}function e(){return +new Date}o.extend=3Do.fn.extend=3Dfuncti=
on(){var J=3Darguments[0]||{},H=3D1,I=3Darguments.length,E=3Dfalse,G;if(=
typeof J=3D=3D=3D"boolean"){E=3DJ;J=3Darguments[1]||{};H=3D2}if(typeof J=
!=3D=3D"object"&&!o.isFunction(J)){J=3D{}}if(I=3D=3DH){J=3Dthis;--H}for(=
;H G[F];if(J=3D=3D=3DL){continue}if(E&&L&&typeof L=3D=3D=3D"object"&&!L.nod=
eType){J[F]=3Do.extend(E,K||(L.length!=3Dnull?[]:{}),L)}else{if(L!=3D=3D=
g){J[F]=3DL}}}}}return J};var b=3D/z-?index|font-?weight|opacity|zoom|li=
ne-?height/i,q=3Ddocument.defaultView||{},s=3DObject.prototype.toString;=
o.extend({noConflict:function(E){l.$=3Dp;if(E){l.jQuery=3Dy}return o},is=
Function:function(E){return s.call(E)=3D=3D=3D"[object Function]"},isArr=
ay:function(E){return s.call(E)=3D=3D=3D"[object Array]"},isXMLDoc:funct=
ion(E){return E.nodeType=3D=3D=3D9&&E.documentElement.nodeName!=3D=3D"HT=
ML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function=
(G){if(G&&/\S/.test(G)){var F=3Ddocument.getElementsByTagName("head")[0]=
||document.documentElement,E=3Ddocument.createElement("script");E.type=3D=
"text/javascript";if(o.support.scriptEval){E.appendChild(document.create=
TextNode(G))}else{E.text=3DG}F.insertBefore(E,F.firstChild);F.removeChil=
d(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase(=
)=3D=3DE.toUpperCase()},each:function(G,K,F){var E,H=3D0,I=3DG.length;if=
(F){if(I=3D=3D=3Dg){for(E in G){if(K.apply(G[E],F)=3D=3D=3Dfalse){break}=
}}else{for(;H =3D=3D=3Dg){for(E in G){if(K.call(G[E],E,G[E])=3D=3D=3Dfalse){break}}}el=
se{for(var J=3DG[0];H G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=3DI.call(H,F)}return =
typeof I=3D=3D=3D"number"&&G=3D=3D"curCSS"&&!b.test(E)?I+"px":I},classNa=
me:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nod=
eType=3D=3D1&&!o.className.has(E.className,H)){E.className+=3D(E.classNa=
me?" ":"")+H}})},remove:function(E,F){if(E.nodeType=3D=3D1){E.className=3D=
F!=3D=3Dg?o.grep(E.className.split(/\s+/),function(G){return !o.classNam=
e.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.c=
lassName||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E=3D=
{};for(var F in G){E[F]=3DH.style[F];H.style[F]=3DG[F]}I.call(H);for(var=
F in G){H.style[F]=3DE[F]}},css:function(H,F,J,E){if(F=3D=3D"width"||F=3D=
=3D"height"){var L,G=3D{position:"absolute",visibility:"hidden",display:=
"block"},K=3DF=3D=3D"width"?["Left","Right"]:["Top","Bottom"];function I=
(){L=3DF=3D=3D"width"?H.offsetWidth:H.offsetHeight;if(E=3D=3D=3D"border"=
){return}o.each(K,function(){if(!E){L-=3DparseFloat(o.curCSS(H,"padding"=
+this,true))||0}if(E=3D=3D=3D"margin"){L+=3DparseFloat(o.curCSS(H,"margi=
n"+this,true))||0}else{L-=3DparseFloat(o.curCSS(H,"border"+this+"Width",=
true))||0}})}if(H.offsetWidth!=3D=3D0){I()}else{o.swap(H,G,I)}return Mat=
h.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){va=
r L,E=3DI.style;if(F=3D=3D"opacity"&&!o.support.opacity){L=3Do.attr(E,"o=
pacity");return L=3D=3D""?"1":L}if(F.match(/float/i)){F=3Dw}if(!G&&E&&E[=
F]){L=3DE[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F=3D"floa=
t"}F=3DF.replace(/([A-Z])/g,"-$1").toLowerCase();var M=3Dq.getComputedSt=
yle(I,null);if(M){L=3DM.getPropertyValue(F)}if(F=3D=3D"opacity"&&L=3D=3D=
""){L=3D"1"}}else{if(I.currentStyle){var J=3DF.replace(/\-(\w)/g,functio=
n(N,O){return O.toUpperCase()});L=3DI.currentStyle[F]||I.currentStyle[J]=
;if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=3DE.left,K=3DI.runtimeS=
tyle.left;I.runtimeStyle.left=3DI.currentStyle.left;E.left=3DL||0;L=3DE.=
pixelLeft+"px";E.left=3DH;I.runtimeStyle.left=3DK}}}}return L},clean:fun=
ction(F,K,I){K=3DK||document;if(typeof K.createElement=3D=3D=3D"undefine=
d"){K=3DK.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.len=
gth=3D=3D=3D1&&typeof F[0]=3D=3D=3D"string"){var H=3D/^<(\w+)\s*\/?>$/.e=
xec(F[0]);if(H){return[K.createElement(H[1])]}}var G=3D[],E=3D[],L=3DK.c=
reateElement("div");o.each(F,function(P,S){if(typeof S=3D=3D=3D"number")=
{S+=3D""}if(!S){return}if(typeof S=3D=3D=3D"string"){S=3DS.replace(/(<(\=
w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|=
link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=3DS.replace(/=
^\s+/,"").substring(0,10).toLowerCase();var Q=3D!O.indexOf(" "]||!O.indexOf(" ieldset>",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,=
"","
"]||!O.indexOf("","<=
/table>"]||(!O.indexOf(" >",""]||!O.indexOf(" dy>",""]||!o.support.htmlSerialize&&[1,"div=
","
"]||[0,"",""];L.innerHTML=3DQ[1]+S+Q[2];while(Q[0]--){L=3D=
L.lastChild}if(!o.support.tbody){var R=3D/ f("=
"&&!R?L.childNodes:[];for(var M=3DN.length-1;M>=3D0;--M){if(o.nodeName(N=
[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])=
}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.crea=
teTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=3Do.makeArray(L.childNode=
s)}if(S.nodeType){G.push(S)}else{G=3Do.merge(G,S)}});if(I){for(var J=3D0=
;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerC=
ase()=3D=3D=3D"text/javascript")){E.push(G[J].parentNode?G[J].parentNode=
.removeChild(G[J]):G[J])}else{if(G[J].nodeType=3D=3D=3D1){G.splice.apply=
(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.a=
ppendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeT=
ype=3D=3D3||J.nodeType=3D=3D8){return g}var H=3D!o.isXMLDoc(J),L=3DK!=3D=
=3Dg;G=3DH&&o.props[G]||G;if(J.tagName){var F=3D/href|src|style/.test(G)=
;if(G=3D=3D"selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in =
J&&H&&!F){if(L){if(G=3D=3D"type"&&o.nodeName(J,"input")&&J.parentNode){t=
hrow"type property can't be changed"}J[G]=3DK}if(o.nodeName(J,"form")&&J=
.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=3D=3D"=
tabIndex"){var I=3DJ.getAttributeNode("tabIndex");return I&&I.specified?=
I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.n=
odeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style=
&&H&&G=3D=3D"style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttri=
bute(G,""+K)}var E=3D!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2)=
:J.getAttribute(G);return E=3D=3D=3Dnull?g:E}if(!o.support.opacity&&G=3D=
=3D"opacity"){if(L){J.zoom=3D1;J.filter=3D(J.filter||"").replace(/alpha\=
([^)]*\)/,"")+(parseInt(K)+""=3D=3D"NaN"?"":"alpha(opacity=3D"+K*100+")"=
)}return J.filter&&J.filter.indexOf("opacity=3D")>=3D0?(parseFloat(J.fil=
ter.match(/opacity=3D([^)]*)/)[1])/100)+"":""}G=3DG.replace(/-([a-z])/ig=
,function(M,N){return N.toUpperCase()});if(L){J[G]=3DK}return J[G]},trim=
:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(=
G){var E=3D[];if(G!=3Dnull){var F=3DG.length;if(F=3D=3Dnull||typeof G=3D=
=3D=3D"string"||o.isFunction(G)||G.setInterval){E[0]=3DG}else{while(F){E=
[--F]=3DG[F]}}}return E},inArray:function(G,H){for(var E=3D0,F=3DH.lengt=
h;E ar F=3D0,G,I=3DH.length;if(!o.support.getAll){while((G=3DE[F++])!=3Dnull=
){if(G.nodeType!=3D8){H[I++]=3DG}}}else{while((G=3DE[F++])!=3Dnull){H[I+=
+]=3DG}}return H},unique:function(K){var F=3D[],E=3D{};try{for(var G=3D0=
,H=3DK.length;G (K[G])}}}catch(I){F=3DK}return F},grep:function(F,J,E){var G=3D[];for(va=
r H=3D0,I=3DF.length;H G},map:function(E,J){var F=3D[];for(var G=3D0,H=3DE.length;G I=3DJ(E[G],G);if(I!=3Dnull){F[F.length]=3DI}}return F.concat.apply([],F)=
}});var C=3Dnavigator.userAgent.toLowerCase();o.browser=3D{version:(C.ma=
tch(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test=
(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:=
/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:functi=
on(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNod=
e")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){=
return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,=
"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},s=
iblings:function(E){return o.sibling(E.parentNode.firstChild,E)},childre=
n:function(E){return o.sibling(E.firstChild)},contents:function(E){retur=
n o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.m=
akeArray(E.childNodes)}},function(E,F){o.fn[E]=3Dfunction(G){var H=3Do.m=
ap(this,F);if(G&&typeof G=3D=3D"string"){H=3Do.multiFilter(G,H)}return t=
his.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"p=
repend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWit=
h"},function(E,F){o.fn[E]=3Dfunction(G){var J=3D[],L=3Do(G);for(var K=3D=
0,H=3DL.length;K0?this.clone(true):this).get();o.fn[F=
].apply(o(L[K]),I);J=3DJ.concat(I)}return this.pushStack(J,E,G)}});o.eac=
h({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType=3D=3D1){thi=
s.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},rem=
oveClass:function(E){o.className.remove(this,E)},toggleClass:function(F,=
E){if(typeof E!=3D=3D"boolean"){E=3D!o.className.has(this,F)}o.className=
[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this])=
.length){o("*",this).add([this]).each(function(){o.event.remove(this);o.=
removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)=
}}},empty:function(){o(this).children().remove();while(this.firstChild){=
this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=3Dfunction(){=
return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o=
.curCSS(E[0],F,true),10)||0}var h=3D"jQuery"+e(),v=3D0,A=3D{};o.extend({=
cache:{},data:function(F,E,G){F=3DF=3D=3Dl?A:F;var H=3DF[h];if(!H){H=3DF=
[h]=3D++v}if(E&&!o.cache[H]){o.cache[H]=3D{}}if(G!=3D=3Dg){o.cache[H][E]=
=3DG}return E?o.cache[H][E]:H},removeData:function(F,E){F=3DF=3D=3Dl?A:F=
;var H=3DF[h];if(E){if(o.cache[H]){delete o.cache[H][E];E=3D"";for(E in =
o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G)=
{if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:f=
unction(F,E,H){if(F){E=3D(E||"fx")+"queue";var G=3Do.data(F,E);if(!G||o.=
isArray(H)){G=3Do.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return=
G},dequeue:function(H,G){var E=3Do.queue(H,G),F=3DE.shift();if(!G||G=3D=
=3D=3D"fx"){F=3DE[0]}if(F!=3D=3Dg){F.call(H)}}});o.fn.extend({data:funct=
ion(E,G){var H=3DE.split(".");H[1]=3DH[1]?"."+H[1]:"";if(G=3D=3D=3Dg){va=
r F=3Dthis.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F=3D=3D=3Dg&&thi=
s.length){F=3Do.data(this[0],E)}return F=3D=3D=3Dg&&H[1]?this.data(H[0])=
:F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function()=
{o.data(this,E,G)})}},removeData:function(E){return this.each(function()=
{o.removeData(this,E)})},queue:function(E,F){if(typeof E!=3D=3D"string")=
{F=3DE;E=3D"fx"}if(F=3D=3D=3Dg){return o.queue(this[0],E)}return this.ea=
ch(function(){var G=3Do.queue(this,E,F);if(E=3D=3D"fx"&&G.length=3D=3D1)=
{G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.d=
equeue(this,E)})}});
/*
* Sizzle CSS Selector Engine - v0.9.3
* Copyright 2009, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){var R=3D/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"=
][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=3D0,=
H=3DObject.prototype.toString;var F=3Dfunction(Y,U,ab,ac){ab=3Dab||[];U=3D=
U||document;if(U.nodeType!=3D=3D1&&U.nodeType!=3D=3D9){return[]}if(!Y||t=
ypeof Y!=3D=3D"string"){return ab}var Z=3D[],W,af,ai,T,ad,V,X=3Dtrue;R.l=
astIndex=3D0;while((W=3DR.exec(Y))!=3D=3Dnull){Z.push(W[1]);if(W[2]){V=3D=
RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length=3D=3D=3D=
2&&I.relative[Z[0]]){af=3DJ(Z[0]+Z[1],U)}else{af=3DI.relative[Z[0]]?[U]:=
F(Z.shift(),U);while(Z.length){Y=3DZ.shift();if(I.relative[Y]){Y+=3DZ.sh=
ift()}af=3DJ(Y,af)}}}else{var ae=3Dac?{expr:Z.pop(),set:E(ac)}:F.find(Z.=
pop(),Z.length=3D=3D=3D1&&U.parentNode?U.parentNode:U,Q(U));af=3DF.filte=
r(ae.expr,ae.set);if(Z.length>0){ai=3DE(af)}else{X=3Dfalse}while(Z.lengt=
h){var ah=3DZ.pop(),ag=3Dah;if(!I.relative[ah]){ah=3D""}else{ag=3DZ.pop(=
)}if(ag=3D=3Dnull){ag=3DU}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=3Daf}if=
(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(a=
i)=3D=3D=3D"[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeT=
ype=3D=3D=3D1){for(var aa=3D0;ai[aa]!=3Dnull;aa++){if(ai[aa]&&(ai[aa]=3D=
=3D=3Dtrue||ai[aa].nodeType=3D=3D=3D1&&K(U,ai[aa]))){ab.push(af[aa])}}}e=
lse{for(var aa=3D0;ai[aa]!=3Dnull;aa++){if(ai[aa]&&ai[aa].nodeType=3D=3D=
=3D1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDupl=
icate=3Dfalse;ab.sort(G);if(hasDuplicate){for(var aa=3D1;aa ++){if(ab[aa]=3D=3D=3Dab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.match=
es=3Dfunction(T,U){return F(T,null,null,U)};F.find=3Dfunction(aa,T,ab){v=
ar Z,X;if(!aa){return[]}for(var W=3D0,V=3DI.order.length;W I.order[W],X;if((X=3DI.match[Y].exec(aa))){var U=3DRegExp.leftContext;if=
(U.substr(U.length-1)!=3D=3D"\\"){X[1]=3D(X[1]||"").replace(/\\/g,"");Z=3D=
I.find[Y](X,T,ab);if(Z!=3Dnull){aa=3Daa.replace(I.match[Y],"");break}}}}=
if(!Z){Z=3DT.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=3D=
function(ad,ac,ag,W){var V=3Dad,ai=3D[],aa=3Dac,Y,T,Z=3Dac&&ac[0]&&Q(ac[=
0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=3DI.match[ab].exe=
c(ad))!=3Dnull){var U=3DI.filter[ab],ah,af;T=3Dfalse;if(aa=3D=3Dai){ai=3D=
[]}if(I.preFilter[ab]){Y=3DI.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=3Dah=
=3Dtrue}else{if(Y=3D=3D=3Dtrue){continue}}}if(Y){for(var X=3D0;(af=3Daa[=
X])!=3Dnull;X++){if(af){ah=3DU(af,Y,X,aa);var ae=3DW^!!ah;if(ag&&ah!=3Dn=
ull){if(ae){T=3Dtrue}else{aa[X]=3Dfalse}}else{if(ae){ai.push(af);T=3Dtru=
e}}}}}if(ah!=3D=3Dg){if(!ag){aa=3Dai}ad=3Dad.replace(I.match[ab],"");if(=
!T){return[]}break}}}if(ad=3D=3DV){if(T=3D=3Dnull){throw"Syntax error, u=
nrecognized expression: "+ad}else{break}}V=3Dad}return aa};var I=3DF.sel=
ectors=3D{order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|=
\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=3D['"]*((?=
:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\=
\.)+)\s*(?:(\S?=3D)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\=
*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)=
\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=3D[^-]|$)=
/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2=
\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHand=
le:{href:function(T){return T.getAttribute("href")}},relative:{"+":funct=
ion(aa,T,Z){var X=3Dtypeof T=3D=3D=3D"string",ab=3DX&&!/\W/.test(T),Y=3D=
X&&!ab;if(ab&&!Z){T=3DT.toUpperCase()}for(var W=3D0,V=3Daa.length,U;W W++){if((U=3Daa[W])){while((U=3DU.previousSibling)&&U.nodeType!=3D=3D1){=
}aa[W]=3DY||U&&U.nodeName=3D=3D=3DT?U||false:U=3D=3D=3DT}}if(Y){F.filter=
(T,aa,true)}},">":function(Z,U,aa){var X=3Dtypeof U=3D=3D=3D"string";if(=
X&&!/\W/.test(U)){U=3Daa?U:U.toUpperCase();for(var V=3D0,T=3DZ.length;V<=
T;V++){var Y=3DZ[V];if(Y){var W=3DY.parentNode;Z[V]=3DW.nodeName=3D=3D=3D=
U?W:false}}}else{for(var V=3D0,T=3DZ.length;V Z[V]=3DX?Y.parentNode:Y.parentNode=3D=3D=3DU}}if(X){F.filter(U,Z,true)}}=
},"":function(W,U,Y){var V=3DL++,T=3DS;if(!U.match(/\W/)){var X=3DU=3DY?=
U:U.toUpperCase();T=3DP}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){v=
ar V=3DL++,T=3DS;if(typeof U=3D=3D=3D"string"&&!U.match(/\W/)){var X=3DU=
=3DY?U:U.toUpperCase();T=3DP}T("previousSibling",U,V,W,X,Y)}},find:{ID:f=
unction(U,V,W){if(typeof V.getElementById!=3D=3D"undefined"&&!W){var T=3D=
V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof =
Y.getElementsByName!=3D=3D"undefined"){var U=3D[],X=3DY.getElementsByNam=
e(V[1]);for(var W=3D0,T=3DX.length;W =3D=3D=3DV[1]){U.push(X[W])}}return U.length=3D=3D=3D0?null:U}},TAG:func=
tion(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:functio=
n(W,U,V,T,Z,aa){W=3D" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(v=
ar X=3D0,Y;(Y=3DU[X])!=3Dnull;X++){if(Y){if(Z^(Y.className&&(" "+Y.class=
Name+" ").indexOf(W)>=3D0)){if(!V){T.push(Y)}}else{if(V){U[X]=3Dfalse}}}=
}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:functio=
n(U,T){for(var V=3D0;T[V]=3D=3D=3Dfalse;V++){}return T[V]&&Q(T[V])?U[1]:=
U[1].toUpperCase()},CHILD:function(T){if(T[1]=3D=3D"nth"){var U=3D/(-?)(=
\d*)n((?:\+|-)?\d*)/.exec(T[2]=3D=3D"even"&&"2n"||T[2]=3D=3D"odd"&&"2n+1=
"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=3D(U[1]+(U[2]||1))-0;T[3]=3D=
U[3]-0}T[0]=3DL++;return T},ATTR:function(X,U,V,T,Y,Z){var W=3DX[1].repl=
ace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=3DI.attrMap[W]}if(X[2]=3D=3D=3D"=
~=3D"){X[4]=3D" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]=3D=
=3D=3D"not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=3DF(X[3],=
null,null,U)}else{var W=3DF.filter(X[3],U,V,true^Y);if(!V){T.push.apply(=
T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[=
0])){return true}}return X},POS:function(T){T.unshift(true);return T}},f=
ilters:{enabled:function(T){return T.disabled=3D=3D=3Dfalse&&T.type!=3D=3D=
"hidden"},disabled:function(T){return T.disabled=3D=3D=3Dtrue},checked:f=
unction(T){return T.checked=3D=3D=3Dtrue},selected:function(T){T.parentN=
ode.selectedIndex;return T.selected=3D=3D=3Dtrue},parent:function(T){ret=
urn !!T.firstChild},empty:function(T){return !T.firstChild},has:function=
(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(=
T.nodeName)},text:function(T){return"text"=3D=3D=3DT.type},radio:functio=
n(T){return"radio"=3D=3D=3DT.type},checkbox:function(T){return"checkbox"=
=3D=3D=3DT.type},file:function(T){return"file"=3D=3D=3DT.type},password:=
function(T){return"password"=3D=3D=3DT.type},submit:function(T){return"s=
ubmit"=3D=3D=3DT.type},image:function(T){return"image"=3D=3D=3DT.type},r=
eset:function(T){return"reset"=3D=3D=3DT.type},button:function(T){return=
"button"=3D=3D=3DT.type||T.nodeName.toUpperCase()=3D=3D=3D"BUTTON"},inpu=
t:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},s=
etFilters:{first:function(U,T){return T=3D=3D=3D0},last:function(V,U,T,W=
){return U=3D=3D=3DW.length-1},even:function(U,T){return T%2=3D=3D=3D0},=
odd:function(U,T){return T%2=3D=3D=3D1},lt:function(V,U,T){return U -0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-=
0=3D=3DU},eq:function(V,U,T){return T[3]-0=3D=3DU}},filter:{PSEUDO:funct=
ion(Z,V,W,aa){var U=3DV[1],X=3DI.filters[U];if(X){return X(Z,W,V,aa)}els=
e{if(U=3D=3D=3D"contains"){return(Z.textContent||Z.innerText||"").indexO=
f(V[3])>=3D0}else{if(U=3D=3D=3D"not"){var Y=3DV[3];for(var W=3D0,T=3DY.l=
ength;W nction(T,W){var Z=3DW[1],U=3DT;switch(Z){case"only":case"first":while(U=3D=
U.previousSibling){if(U.nodeType=3D=3D=3D1){return false}}if(Z=3D=3D"fir=
st"){return true}U=3DT;case"last":while(U=3DU.nextSibling){if(U.nodeType=
=3D=3D=3D1){return false}}return true;case"nth":var V=3DW[2],ac=3DW[3];i=
f(V=3D=3D1&&ac=3D=3D0){return true}var Y=3DW[0],ab=3DT.parentNode;if(ab&=
&(ab.sizcache!=3D=3DY||!T.nodeIndex)){var X=3D0;for(U=3Dab.firstChild;U;=
U=3DU.nextSibling){if(U.nodeType=3D=3D=3D1){U.nodeIndex=3D++X}}ab.sizcac=
he=3DY}var aa=3DT.nodeIndex-ac;if(V=3D=3D0){return aa=3D=3D0}else{return=
(aa%V=3D=3D0&&aa/V>=3D0)}}},ID:function(U,T){return U.nodeType=3D=3D=3D1=
&&U.getAttribute("id")=3D=3D=3DT},TAG:function(U,T){return(T=3D=3D=3D"*"=
&&U.nodeType=3D=3D=3D1)||U.nodeName=3D=3D=3DT},CLASS:function(U,T){retur=
n(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:fu=
nction(Y,W){var V=3DW[1],T=3DI.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=3D=
null?Y[V]:Y.getAttribute(V),Z=3DT+"",X=3DW[2],U=3DW[4];return T=3D=3Dnul=
l?X=3D=3D=3D"!=3D":X=3D=3D=3D"=3D"?Z=3D=3D=3DU:X=3D=3D=3D"*=3D"?Z.indexO=
f(U)>=3D0:X=3D=3D=3D"~=3D"?(" "+Z+" ").indexOf(U)>=3D0:!U?Z&&T!=3D=3Dfal=
se:X=3D=3D=3D"!=3D"?Z!=3DU:X=3D=3D=3D"^=3D"?Z.indexOf(U)=3D=3D=3D0:X=3D=3D=
=3D"$=3D"?Z.substr(Z.length-U.length)=3D=3D=3DU:X=3D=3D=3D"|=3D"?Z=3D=3D=
=3DU||Z.substr(0,U.length+1)=3D=3D=3DU+"-":false},POS:function(X,U,V,Y){=
var T=3DU[2],W=3DI.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=3DI.m=
atch.POS;for(var O in I.match){I.match[O]=3DRegExp(I.match[O].source+/(?=
![^\[]*\])(?![^\(]*\))/.source)}var E=3Dfunction(U,T){U=3DArray.prototyp=
e.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.pro=
totype.slice.call(document.documentElement.childNodes)}catch(N){E=3Dfunc=
tion(X,W){var U=3DW||[];if(H.call(X)=3D=3D=3D"[object Array]"){Array.pro=
totype.push.apply(U,X)}else{if(typeof X.length=3D=3D=3D"number"){for(var=
V=3D0,T=3DX.length;V U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocume=
ntPosition){G=3Dfunction(U,T){var V=3DU.compareDocumentPosition(T)&4?-1:=
U=3D=3D=3DT?0:1;if(V=3D=3D=3D0){hasDuplicate=3Dtrue}return V}}else{if("s=
ourceIndex" in document.documentElement){G=3Dfunction(U,T){var V=3DU.sou=
rceIndex-T.sourceIndex;if(V=3D=3D=3D0){hasDuplicate=3Dtrue}return V}}els=
e{if(document.createRange){G=3Dfunction(W,U){var V=3DW.ownerDocument.cre=
ateRange(),T=3DU.ownerDocument.createRange();V.selectNode(W);V.collapse(=
true);T.selectNode(U);T.collapse(true);var X=3DV.compareBoundaryPoints(R=
ange.START_TO_END,T);if(X=3D=3D=3D0){hasDuplicate=3Dtrue}return X}}}}(fu=
nction(){var U=3Ddocument.createElement("form"),V=3D"script"+(new Date).=
getTime();U.innerHTML=3D"";var T=3Ddocument.docum=
entElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V=
)){I.find.ID=3Dfunction(X,Y,Z){if(typeof Y.getElementById!=3D=3D"undefin=
ed"&&!Z){var W=3DY.getElementById(X[1]);return W?W.id=3D=3D=3DX[1]||type=
of W.getAttributeNode!=3D=3D"undefined"&&W.getAttributeNode("id").nodeVa=
lue=3D=3D=3DX[1]?[W]:g:[]}};I.filter.ID=3Dfunction(Y,W){var X=3Dtypeof Y=
.getAttributeNode!=3D=3D"undefined"&&Y.getAttributeNode("id");return Y.n=
odeType=3D=3D=3D1&&X&&X.nodeValue=3D=3D=3DW}}T.removeChild(U)})();(funct=
ion(){var T=3Ddocument.createElement("div");T.appendChild(document.creat=
eComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=3Dfunc=
tion(U,Y){var X=3DY.getElementsByTagName(U[1]);if(U[1]=3D=3D=3D"*"){var =
W=3D[];for(var V=3D0;X[V];V++){if(X[V].nodeType=3D=3D=3D1){W.push(X[V])}=
}X=3DW}return X}}T.innerHTML=3D"";if(T.firstChild&&typ=
eof T.firstChild.getAttribute!=3D=3D"undefined"&&T.firstChild.getAttribu=
te("href")!=3D=3D"#"){I.attrHandle.href=3Dfunction(U){return U.getAttrib=
ute("href",2)}}})();if(document.querySelectorAll){(function(){var T=3DF,=
U=3Ddocument.createElement("div");U.innerHTML=3D"

"=
;if(U.querySelectorAll&&U.querySelectorAll(".TEST").length=3D=3D=3D0){re=
turn}F=3Dfunction(Y,X,V,W){X=3DX||document;if(!W&&X.nodeType=3D=3D=3D9&&=
!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W=
)};F.find=3DT.find;F.filter=3DT.filter;F.selectors=3DT.selectors;F.match=
es=3DT.matches})()}if(document.getElementsByClassName&&document.document=
Element.getElementsByClassName){(function(){var T=3Ddocument.createEleme=
nt("div");T.innerHTML=3D"
>
";if(T.getElementsByClassName("e").length=3D=3D=3D0){return}T.las=
tChild.className=3D"e";if(T.getElementsByClassName("e").length=3D=3D=3D1=
){return}I.order.splice(1,0,"CLASS");I.find.CLASS=3Dfunction(U,V,W){if(t=
ypeof V.getElementsByClassName!=3D=3D"undefined"&&!W){return V.getElemen=
tsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=3DU=3D=3D"pr=
eviousSibling"&&!ac;for(var W=3D0,V=3Dad.length;W f(T){if(ab&&T.nodeType=3D=3D=3D1){T.sizcache=3DY;T.sizset=3DW}T=3DT[U];v=
ar X=3Dfalse;while(T){if(T.sizcache=3D=3D=3DY){X=3Dad[T.sizset];break}if=
(T.nodeType=3D=3D=3D1&&!ac){T.sizcache=3DY;T.sizset=3DW}if(T.nodeName=3D=
=3D=3DZ){X=3DT;break}T=3DT[U]}ad[W]=3DX}}}function S(U,Z,Y,ad,aa,ac){var=
ab=3DU=3D=3D"previousSibling"&&!ac;for(var W=3D0,V=3Dad.length;W {var T=3Dad[W];if(T){if(ab&&T.nodeType=3D=3D=3D1){T.sizcache=3DY;T.sizse=
t=3DW}T=3DT[U];var X=3Dfalse;while(T){if(T.sizcache=3D=3D=3DY){X=3Dad[T.=
sizset];break}if(T.nodeType=3D=3D=3D1){if(!ac){T.sizcache=3DY;T.sizset=3D=
W}if(typeof Z!=3D=3D"string"){if(T=3D=3D=3DZ){X=3Dtrue;break}}else{if(F.=
filter(Z,[T]).length>0){X=3DT;break}}}T=3DT[U]}ad[W]=3DX}}}var K=3Ddocum=
ent.compareDocumentPosition?function(U,T){return U.compareDocumentPositi=
on(T)&16}:function(U,T){return U!=3D=3DT&&(U.contains?U.contains(T):true=
)};var Q=3Dfunction(T){return T.nodeType=3D=3D=3D9&&T.documentElement.no=
deName!=3D=3D"HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=3Dfunc=
tion(T,aa){var W=3D[],X=3D"",Y,V=3Daa.nodeType?[aa]:aa;while((Y=3DI.matc=
h.PSEUDO.exec(T))){X+=3DY[0];T=3DT.replace(I.match.PSEUDO,"")}T=3DI.rela=
tive[T]?T+"*":T;for(var Z=3D0,U=3DV.length;Z .filter(X,W)};o.find=3DF;o.filter=3DF.filter;o.expr=3DF.selectors;o.expr=
[":"]=3Do.expr.filters;F.selectors.filters.hidden=3Dfunction(T){return T=
.offsetWidth=3D=3D=3D0||T.offsetHeight=3D=3D=3D0};F.selectors.filters.vi=
sible=3Dfunction(T){return T.offsetWidth>0||T.offsetHeight>0};F.selector=
s.filters.animated=3Dfunction(T){return o.grep(o.timers,function(U){retu=
rn T=3D=3D=3DU.elem}).length};o.multiFilter=3Dfunction(V,T,U){if(U){V=3D=
":not("+V+")"}return F.matches(V,T)};o.dir=3Dfunction(V,U){var T=3D[],W=3D=
V[U];while(W&&W!=3Ddocument){if(W.nodeType=3D=3D1){T.push(W)}W=3DW[U]}re=
turn T};o.nth=3Dfunction(X,T,V,W){T=3DT||1;var U=3D0;for(;X;X=3DX[V]){if=
(X.nodeType=3D=3D1&&++U=3D=3DT){break}}return X};o.sibling=3Dfunction(V,=
U){var T=3D[];for(;V;V=3DV.nextSibling){if(V.nodeType=3D=3D1&&V!=3DU){T.=
push(V)}}return T};return;l.Sizzle=3DF})();o.event=3D{add:function(I,F,H=
,K){if(I.nodeType=3D=3D3||I.nodeType=3D=3D8){return}if(I.setInterval&&I!=
=3Dl){I=3Dl}if(!H.guid){H.guid=3Dthis.guid++}if(K!=3D=3Dg){var G=3DH;H=3D=
this.proxy(G);H.data=3DK}var E=3Do.data(I,"events")||o.data(I,"events",{=
}),J=3Do.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=
=3D=3D"undefined"&&!o.event.triggered?o.event.handle.apply(arguments.cal=
lee.elem,arguments):g});J.elem=3DI;o.each(F.split(/\s+/),function(M,N){v=
ar O=3DN.split(".");N=3DO.shift();H.type=3DO.slice().sort().join(".");va=
r L=3DE[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,=
K,O)}if(!L){L=3DE[N]=3D{};if(!o.event.special[N]||o.event.special[N].set=
up.call(I,K,O)=3D=3D=3Dfalse){if(I.addEventListener){I.addEventListener(=
N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=3D=
H;o.event.global[N]=3Dtrue});I=3Dnull},guid:1,global:{},remove:function(=
K,H,J){if(K.nodeType=3D=3D3||K.nodeType=3D=3D8){return}var G=3Do.data(K,=
"events"),F,E;if(G){if(H=3D=3D=3Dg||(typeof H=3D=3D=3D"string"&&H.charAt=
(0)=3D=3D".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type)=
{J=3DH.handler;H=3DH.type}o.each(H.split(/\s+/),function(M,O){var Q=3DO.=
split(".");O=3DQ.shift();var N=3DRegExp("(^|\\.)"+Q.slice().sort().join(=
".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in=
G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O=
]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){=
if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)=3D=3D=3Dfa=
lse){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"=
),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))=
}}}F=3Dnull;delete G[O]}}})}for(F in G){break}if(!F){var L=3Do.data(K,"h=
andle");if(L){L.elem=3Dnull}o.removeData(K,"events");o.removeData(K,"han=
dle")}}},trigger:function(I,K,H,E){var G=3DI.type||I;if(!E){I=3Dtypeof I=
=3D=3D=3D"object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf(=
"!")>=3D0){I.type=3DG=3DG.slice(0,-1);I.exclusive=3Dtrue}if(!H){I.stopPr=
opagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&=
&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.node=
Type=3D=3D3||H.nodeType=3D=3D8){return g}I.result=3Dg;I.target=3DH;K=3Do=
.makeArray(K);K.unshift(I)}I.currentTarget=3DH;var J=3Do.data(H,"handle"=
);if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=3D=3D"click"))&&H[=
"on"+G]&&H["on"+G].apply(H,K)=3D=3D=3Dfalse){I.result=3Dfalse}if(!E&&H[G=
]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=3D=3D"click")){this.t=
riggered=3Dtrue;try{H[G]()}catch(L){}}this.triggered=3Dfalse;if(!I.isPro=
pagationStopped()){var F=3DH.parentNode||H.ownerDocument;if(F){o.event.t=
rigger(I,K,F,true)}}},handle:function(K){var J,E;K=3Darguments[0]=3Do.ev=
ent.fix(K||l.event);K.currentTarget=3Dthis;var L=3DK.type.split(".");K.t=
ype=3DL.shift();J=3D!L.length&&!K.exclusive;var I=3DRegExp("(^|\\.)"+L.s=
lice().sort().join(".*\\.")+"(\\.|$)");E=3D(o.data(this,"events")||{})[K=
.type];for(var G in E){var H=3DE[G];if(J||I.test(H.type)){K.handler=3DH;=
K.data=3DH.data;var F=3DH.apply(this,arguments);if(F!=3D=3Dg){K.result=3D=
F;if(F=3D=3D=3Dfalse){K.preventDefault();K.stopPropagation()}}if(K.isImm=
ediatePropagationStopped()){break}}}},props:"altKey attrChange attrName =
bubbles button cancelable charCode clientX clientY ctrlKey currentTarget=
data detail eventPhase fromElement handler keyCode metaKey newValue ori=
ginalTarget pageX pageY prevValue relatedNode relatedTarget screenX scre=
enY shiftKey srcElement target toElement view wheelDelta which".split(" =
"),fix:function(H){if(H[h]){return H}var F=3DH;H=3Do.Event(F);for(var G=3D=
this.props.length,J;G;){J=3Dthis.props[--G];H[J]=3DF[J]}if(!H.target){H.=
target=3DH.srcElement||document}if(H.target.nodeType=3D=3D3){H.target=3D=
H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=3D=
H.fromElement=3D=3DH.target?H.toElement:H.fromElement}if(H.pageX=3D=3Dnu=
ll&&H.clientX!=3Dnull){var I=3Ddocument.documentElement,E=3Ddocument.bod=
y;H.pageX=3DH.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLef=
t||0);H.pageY=3DH.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientT=
op||0)}if(!H.which&&((H.charCode||H.charCode=3D=3D=3D0)?H.charCode:H.key=
Code)){H.which=3DH.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaK=
ey=3DH.ctrlKey}if(!H.which&&H.button){H.which=3D(H.button&1?1:(H.button&=
2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=3DE||function(){r=
eturn F.apply(this,arguments)};E.guid=3DF.guid=3DF.guid||E.guid||this.gu=
id++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAl=
l:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function=
(G){if(G.length){var E=3D0,F=3DRegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((=
o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});=
if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=3Dfunction(E){if(!this=
.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=3D=
E;this.type=3DE.type}else{this.type=3DE}this.timeStamp=3De();this[h]=3Dt=
rue};function k(){return false}function u(){return true}o.Event.prototyp=
e=3D{preventDefault:function(){this.isDefaultPrevented=3Du;var E=3Dthis.=
originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.re=
turnValue=3Dfalse},stopPropagation:function(){this.isPropagationStopped=3D=
u;var E=3Dthis.originalEvent;if(!E){return}if(E.stopPropagation){E.stopP=
ropagation()}E.cancelBubble=3Dtrue},stopImmediatePropagation:function(){=
this.isImmediatePropagationStopped=3Du;this.stopPropagation()},isDefault=
Prevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var =
a=3Dfunction(F){var E=3DF.relatedTarget;while(E&&E!=3Dthis){try{E=3DE.pa=
rentNode}catch(G){E=3Dthis}}if(E!=3Dthis){F.type=3DF.data;o.event.handle=
.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mousel=
eave"},function(F,E){o.event.special[E]=3D{setup:function(){o.event.add(=
this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.exten=
d({bind:function(F,G,E){return F=3D=3D"unload"?this.one(F,G,E):this.each=
(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=3D=
o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(th=
is,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})=
},unbind:function(F,E){return this.each(function(){o.event.remove(this,F=
,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger=
(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=3Do.Event(E=
);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);re=
turn F.result}},toggle:function(G){var E=3Darguments,F=3D1;while(F gth){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(=
H){this.lastToggle=3D(this.lastToggle||0)%F;H.preventDefault();return E[=
this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){=
return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isRe=
ady){E.call(document,o)}else{o.readyList.push(E)}return this},live:funct=
ion(G,F){var E=3Do.event.proxy(F);E.guid+=3Dthis.selector+G;o(document).=
bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){=
o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:nu=
ll);return this}});function c(H){var E=3DRegExp("(^|\\.)"+H.type+"(\\.|$=
)"),G=3Dtrue,F=3D[];o.each(o.data(this,"events").live||[],function(I,J){=
if(E.test(J.type)){var K=3Do(H.target).closest(J.data)[0];if(K){F.push({=
elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o=
.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,=
H,this.fn.data)=3D=3D=3Dfalse){return(G=3Dfalse)}});return G}function i(=
F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o=
.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.is=
Ready=3Dtrue;if(o.readyList){o.each(o.readyList,function(){this.call(doc=
ument,o)});o.readyList=3Dnull}o(document).triggerHandler("ready")}}});va=
r x=3Dfalse;function B(){if(x){return}x=3Dtrue;if(document.addEventListe=
ner){document.addEventListener("DOMContentLoaded",function(){document.re=
moveEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},=
false)}else{if(document.attachEvent){document.attachEvent("onreadystatec=
hange",function(){if(document.readyState=3D=3D=3D"complete"){document.de=
tachEvent("onreadystatechange",arguments.callee);o.ready()}});if(documen=
t.documentElement.doScroll&&l=3D=3Dl.top){(function(){if(o.isReady){retu=
rn}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arg=
uments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.=
each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mou=
seup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,su=
bmit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=3Df=
unction(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload"=
,function(){for(var E in o.cache){if(E!=3D1&&o.cache[E].handle){o.event.=
remove(o.cache[E].handle.elem)}}});(function(){o.support=3D{};var F=3Ddo=
cument.documentElement,G=3Ddocument.createElement("script"),K=3Ddocument=
.createElement("div"),J=3D"script"+(new Date).getTime();K.style.display=3D=
"none";K.innerHTML=3D'
olor:red;float:left;opacity:.5;">a');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
"+(isMultiMonth?""+((numMonths[0]>0&&col==numMonths[1]-1)?'
':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("
")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("
");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=php.gif
    Content-Type: image/gif; name=php.gif
    Content-Location: http://static.php.net/www.php.net/images/php.gif
    Content-Transfer-Encoding: Base64

    R0lGODlheABDAOZqAH+CuDk3RyglKszN4qGky9PV57K01ENCWIOGuYKDs1JScpCS
    wsLE3qqs0ExLY1tcg93e7Ds4PG5xpWptnWFjjXV5sXt+teXm8JmcxoyNwbm62Wtr
    kk5Oa3F0qXp6o4iLvXJ0o3RzmI6QwVpbfuLj73t9raSl0G1wonJ2rJWWyLu92XR4
    roWIu5KVw9jZ6pKSxGRmkmtun6WozpSWxS4rL1NRaLO012xqjFxbdoqNv2Zolmhq
    mpyfyDEuOa6w05yczVVWeJ6hypaZxYGCr2dplz89ULy+2l5giZiZyIyOv4mKuldY
    fLa319XX6CIeIGxvns7Q5L/A3Hd7tHZ4p19efZmZzG5vmHN3riIeH////5COj1lW
    V8fGx+7u9dXU1fb2+oKAgayqq3Ryc/Hw8Z6cnePi40tISbm4uWdkZYmJtgD/AEdG
    X9/g7ZuczGlrnG9zp4yMuri52bi615qbzKeqz9vc65qcyWZkhGhniaeo0m5woIuL
    ucbH4MfJ4WlsnJeYyyH5BAEAAGoALAAAAAB4AEMAAAf/gGqCg4SFhoeIiYqLjI2O
    j5CRkpOUlZaXlm0/bXOYnp+gP3l5Nj4acUwaGkwGPj4NMgRBPBhCLQtJIjkfGTki
    LymgwqENGgx9TQVQUAN9fAxRUSpyrK90sbNCMy26HwgAFhYVVyglFgkZwcPrjCZx
    fC5sbBAQdS7JA9QysyIf/iwAEQgEQLDgN4LhpKxA8UbCCT87nkwZkoSdRTVBbAxg
    Q+KCRxIk8jUQskCKyZMoU6pceXJcBwkTduiAQeEIBStDRFzEFIQJFI4eL7gwQqcF
    y6NIk6K88iYGjCNHHoxYcsSDzp2Qfmh0AYEjBCMEWCgdSzbplRM6HiwBokDBiCkz
    /7AuMqGhQBMXdQoYSFK2r1+kHWAsUcCBgwM8CeQayhNlAJQCA3zk+LtyAYbLmDF8
    oJz0DQUFDtasUeBBsZo8Rvj0GcBkBueVH7JwmU2bS5fXSt0sWXPggIMQO91FYcCg
    AQLcKzFwwcK8uZnbyJN22F2kyJrSw374kGNEBQ8L0VeqINO8uZgC4ZVeeXAgQAAO
    cECZMMBEDgEA6VcWEFOeORkV+Sn1hgLu9XAHJnPQ4YMBMhwXoEpdmNEfFlwQ8KBS
    MazRQw8H7FHJDzI00EBJF6YEQBYTYpHFZiUm9UAAGwInSRsE7ONgiycpN6EZX+Co
    lB9F0EADFZHYEQQBM4CH1P8HmTXZJItHqRDGhGJc0CSJLDHp5Jb4jYWCAzQIUMMj
    SGAQBJRHffBFFmy26eabWXRRQANdolQAGBOSAWebFwxg4UkL7Ckom10M0IBSQAgg
    gAONzCAEBmIpRcByKVZqBhhcfAEgSl1sUWmKNGyhRRldkGjAlJ9OuAUYXnRxKFIj
    COAEo4psI8SNSY2X6qdbeAFBlyfu+ikYY2AgxQB4CqtqGQMkNYITTuCQSAoitIBm
    UhDwp2yKYUBgEgZebJsiGrdd4Km45dHgRbNIrQEtdoX84ctkZX0hIbr9eQGglPjm
    2wCK/TZHQxl/HhWAEwIsYEg/9JIVW8DlbdHjnRAzp8X/BeFWjIUY0B3VgaxjEpIC
    Ah/UOdakO8I5xhnaTugFAZ1OyMWbY3CBRopaZIFqxHCWcca5E5aBJUsKQJsGId7g
    Opau/YnhLUoLNNAFeRNqwQDA/a2IEgYNfBFB1VloUTW7gBrwRbL9hWGAUjTMOsgf
    ACCgZFnZ5rmpiVl83XQWGZfH40oQAN1czoIzd8baKn0wBs53H7UEtAqrIYIFJpNl
    r8wFpxS4qjpT+XRKMfd3RhY0BG3sSqGXp0XjLHUA7Q2CsJBQXw9POMa1J23eHxpZ
    oN3cfyoFG3QZE9KQxVGpD846S0W4rUY4c5OFcn8R9MjS5f0RjrlK4BafxRmqXnAU
    /9blAa8UB070IEgFlDFdHhqfp1R72uQ3d7tK/Pa3Rdhjs4QB8dtTCgWgJYgVUKZu
    2VueSQwAvqD1rTnV04/vmAOGLBQOC4djCQOo1p/7CZCAKbgC+/yCvfJUiCXJY04E
    Ore7+J0khVgIA+lMtxIAeG1C5CLLAJ0gCBQYsC/C6yDujkWp7PWuassLYnm8AMB0
    HU8/HCxPGBS4kh0KogMoGCFZdES9J6LkAwXwQun6Q4MxfOGCJ0xJ9yb0vfBxDwJi
    nFD1KncUK6phIVpcWhSZQy4V+FEFEOjCGLQwRtENoH7M8SBK8sczsWWvC38EZBfK
    4EiZUXEl6FPf8zpwhb7sR/9VWghlKMVwrxSJ4QsEeKAKvWinCWKhghcUlSi1QMph
    ia8szaPVB97Qgb5ESGNo+MICToVDF5rEXBOSYSEDdsqhSed1gkiBBN7wQ6UosV/N
    PJYrrbYSRGKBiRoDgzD78jgnRO55EujlWNbYLxqcYZxSQGZ/uPCqramSOW0MWATO
    cAFnss15gnjBCSTQSaUwUlxmIMMYBlCnGXbQn8TUH//wZQYZMoCOSSmaE45GiCGc
    4A1joZj+ZjlLMnBhDIVCU6BIGkpWnkQFXGDp6C4oBpaG0qQoZcAQpQMyQ6TgBCdQ
    J1JgyIUL0IMeBfgjAfxpEkAe9aiZA9QAnkqPQy6TOV7/MOpRk+pHAux0LAdL2CGS
    EIMToAAp10wkU30khQU0sTxZwChy3OUEeBkiAWUtaHLuuUK2sqQBDYxYx/JTTmkp
    ogR5ZclB+WhMv0qBAZVsDhjQE6By0moRiDWrBKvGAMeqRHdSvCRlNHpZRpRgAjHo
    QB6lQNR6etYkeXPZ6aLTgQNAq7SNSABqJaDFtGJhDGv10QIWx0a5+oUIPYCWYSOh
    hCdMQLNS+N8Wpktd3r3WntSlLhgG+xoFyEoAMprEC0DghxjwFgAFoCo9EHddKaBX
    vRBwLWWIcDAnRICjlkiAG1D7htW2168nsK1yQfGCKfgBtar9r19RwAFZOaEI+AWF
    /xL04IYD91fBJTrBGhzcg/CygwUUPrAEzorh8BzhAIoSQA9gpxgWgGAHbnBDDKhZ
    Ysr4gQMBCJMAAsBi0wgiCSUgwg5gPAEa1zgpEyBQD4QkJrv6eBApSIAedEAEIbsh
    qP7F8BuOgOMNLbkIeHjBkxfxAinr4Mxn3sFHSXzdHRxBAe2B0YYOcAMPjfkRL0DA
    FIgAgz77mQh++KhQ8zMBIjwANNVxj6JxEAI735kSIhjCnilA6UpT+gh9rnCg38Bp
    Tkvg058GKlCJcGm2iKY3B6hOEQJwABxsIDGPFkYKPlACEFgBKlB5gK53PZUlrAUI
    bGkLYQpjmNCcujdFUAAVbjgwBDHHWjEpUAICPOCBDWwgLb4GdrDbQmzDcIAKIxiB
    FaxQgmY/+9yLEEEaEHAVdLv73fCOd7wDAQA7

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=small_submit_white.gif
    Content-Type: image/gif; name=small_submit_white.gif
    Content-Location: http://static.php.net/www.php.net/images/small_submit_white.gif
    Content-Transfer-Encoding: Base64

    R0lGODlhCwALAID/AP///8DAwCH5BAEAAAEALAAAAAALAAsAQAIUhI8JEcn/1GoI
    QokPxVHbXjFcUgAAOylQpBQAOw==

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=caret-r.gif
    Content-Type: image/gif; name=caret-r.gif
    Content-Location: http://static.php.net/www.php.net/images/caret-r.gif
    Content-Transfer-Encoding: Base64

    R0lGODlhCwAHAIAAAMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAIPRAKGyZrXnJQw
    1moXvgsUADs=

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=caret-l.gif
    Content-Type: image/gif; name=caret-l.gif
    Content-Location: http://static.php.net/www.php.net/images/caret-l.gif
    Content-Transfer-Encoding: Base64

    R0lGODlhCwAHAIAAAMDAwAAAACH5BAEAAAAALAAAAAALAAcAQAIPhBFheYx63oJR
    2omzq84VADs=

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=small_submit.gif
    Content-Type: image/gif; name=small_submit.gif
    Content-Location: http://static.php.net/www.php.net/images/small_submit.gif
    Content-Transfer-Encoding: Base64

    R0lGODlhCwALAID/AAAAmf///yH5BAEAAAEALAAAAAALAAsAQAIUhI8JEcn/1GoI
    QokPxVHbXjFcUgAAOw==

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=21009b70229598c6a80eef8b45bf282b-imagecopyresized.jpg
    Content-Type: image/jpeg; name=21009b70229598c6a80eef8b45bf282b-imagecopyresized.jpg
    Content-Location: http://www.php.net/manual/en/images/21009b70229598c6a80eef8b45bf282b-imagecopyresized.jpg
    Content-Transfer-Encoding: Base64

    /9j/4AAQSkZJRgABAQAAAQABAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1
    c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUI
    BwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8n
    OT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIy
    MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAGQAvAwEiAAIRAQMR
    Af/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMF
    BQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYX
    GBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6
    g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV
    1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAAB
    AgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXET
    IjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJ
    SlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWm
    p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5
    +v/aAAwDAQACEQMRAD8A9I1v4gQ20slvpiLOV488nK5749e3Pf6YNefap8Q5JbyW
    1vNdigljkZHiWYJsYHBGc5HI9arJJbxIstw5S2UBpHHVUHJP5Vw3h3WrFPC1zbzT
    /wBoapezyymwjtpHklkbACn5dpBKg9cgMcAniu6UY0rJfiQm2dJr3iN9NvdJDT2k
    sF7I4mlmkLbUUIQysGx8wY4JyOB2q2uo6dPYS3y3drLbQkCWRZFYR5OBu5+XJ6Z6
    44rlfDlg0PiK0sr4MtzpOlcbTlRJJKZMZ/65zH8QcZHNUNekkhtvFTGKKBbjVILA
    sowrCIOXOB1O5I2J/wBr3qfbTS5u4WR6NofjU2lxHFpOvRZXhbVp1eN8sDtEZPc/
    3cNyeRXpXhT4gQa3qA0fUoUstVKb4AHzHdqAN5jJ6MOSUOSBggsMkeGaxdWXii/s
    LTREaaGG7jnkv4IWRbSMbsopdVOcYIHAJVep6aPiMaj/AGan9jfbv7WEo+x/YN/n
    b8Hdt2fN/q/Mz7ZpSgpxcuwXseoeJ/h40zXMmkxBrW6ikjms0kEbLvBUmIkFRwxO
    D0xx1wODWwXRLeDTvs1xZxxxrsiugVcj+8cgZJIJyBjOa+gqzPEf/Isat/15Tf8A
    oBrOnXcXrqNxPE9xIAzkVUv7GxvLixu7uSdJrCXzoGSYIu75SNwKnIBUdCOprPfp
    U3h//kb9F/6/4P8A0YtdE6ytZoSialst/qp26Ppt3qcm5kDQpiIMF3YaVsIvGOpz
    yOORXo3grwC+jXZ1nXXt7rWBuS3WHJhs4zxhCwBLsPvOQDj5QAM7u6ormqVpT0ex
    Sikf/9k=

    ------------6nhAxGuvOMzG6waYgcmWNI
    Content-Disposition: inline; filename=notes-add.gif
    Content-Type: image/gif; name=notes-add.gif
    Content-Location: http://static.php.net/www.php.net/images/notes-add.gif
    Content-Transfer-Encoding: Base64

    R0lGODlhDQANAID/AMDAwGZmZiH5BAEAAAAALAAAAAANAA0AQAIfjI8IC8cdnmOp
    KmpktDnjiD3i4pElBFkot4Gmi45SAQA7

    ------------6nhAxGuvOMzG6waYgcmWNI--