+<script type="text/javascript">
+ function orderBy(order) {
+ var desc = 0;
+ var reg = /\&order\=(.+)\-\-(\d)$/;
+ reg.exec(document.location.href);
+ if(RegExp.$1 == order) {
+ if(RegExp.$2 == 0) {
+ document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--1";
+ }
+ else{
+ document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--0";
+ }
+ }
+ else {
+ if(reg.test(document.location.href)) {
+ document.location.href = document.location.href.substring(0,document.location.href.lastIndexOf("&order=")) + "&order=" + order + "--0";
+ }
+ else {
+ document.location.href = document.location.href + "&order=" + order + "--1";
+ }
+ }
+ }
+</script>